Skip to content

Commit 0f6b148

Browse files
committed
Allow lang and lib features to share names
1 parent 74e35d2 commit 0f6b148

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

src/librustc/middle/stability.rs

+8-4
Original file line numberDiff line numberDiff line change
@@ -403,10 +403,14 @@ impl<'a, 'tcx> Index<'tcx> {
403403
active_features: Default::default(),
404404
};
405405

406-
let ref active_lib_features = tcx.features().declared_lib_features;
407-
408-
// Put the active features into a map for quick lookup
409-
index.active_features = active_lib_features.iter().map(|&(ref s, _)| s.clone()).collect();
406+
let active_lib_features = &tcx.features().declared_lib_features;
407+
let active_lang_features = &tcx.features().declared_lang_features;
408+
409+
// Put the active features into a map for quick lookup.
410+
index.active_features =
411+
active_lib_features.iter().map(|&(ref s, ..)| s.clone())
412+
.chain(active_lang_features.iter().map(|&(ref s, ..)| s.clone()))
413+
.collect();
410414

411415
{
412416
let krate = tcx.hir().krate();

0 commit comments

Comments
 (0)