@@ -11,7 +11,8 @@ use rustc_ast::{
1111use  rustc_attr as  attr; 
1212use  rustc_data_structures:: flat_map_in_place:: FlatMapInPlace ; 
1313use  rustc_feature:: { 
14-     ACCEPTED_FEATURES ,  AttributeSafety ,  Features ,  REMOVED_FEATURES ,  UNSTABLE_FEATURES , 
14+     ACCEPTED_LANG_FEATURES ,  AttributeSafety ,  Features ,  REMOVED_LANG_FEATURES , 
15+     UNSTABLE_LANG_FEATURES , 
1516} ; 
1617use  rustc_lint_defs:: BuiltinLintDiag ; 
1718use  rustc_parse:: validate_attr; 
@@ -77,7 +78,7 @@ pub fn features(sess: &Session, krate_attrs: &[Attribute], crate_name: Symbol) -
7778            } ; 
7879
7980            // If the enabled feature has been removed, issue an error. 
80-             if  let  Some ( f)  = REMOVED_FEATURES . iter ( ) . find ( |f| name == f. feature . name )  { 
81+             if  let  Some ( f)  = REMOVED_LANG_FEATURES . iter ( ) . find ( |f| name == f. feature . name )  { 
8182                sess. dcx ( ) . emit_err ( FeatureRemoved  { 
8283                    span :  mi. span ( ) , 
8384                    reason :  f. reason . map ( |reason| FeatureRemovedReason  {  reason } ) , 
@@ -86,7 +87,7 @@ pub fn features(sess: &Session, krate_attrs: &[Attribute], crate_name: Symbol) -
8687            } 
8788
8889            // If the enabled feature is stable, record it. 
89-             if  let  Some ( f)  = ACCEPTED_FEATURES . iter ( ) . find ( |f| name == f. name )  { 
90+             if  let  Some ( f)  = ACCEPTED_LANG_FEATURES . iter ( ) . find ( |f| name == f. name )  { 
9091                let  since = Some ( Symbol :: intern ( f. since ) ) ; 
9192                features. set_enabled_lang_feature ( name,  mi. span ( ) ,  since) ; 
9293                continue ; 
@@ -103,7 +104,7 @@ pub fn features(sess: &Session, krate_attrs: &[Attribute], crate_name: Symbol) -
103104            } 
104105
105106            // If the enabled feature is unstable, record it. 
106-             if  UNSTABLE_FEATURES . iter ( ) . find ( |f| name == f. name ) . is_some ( )  { 
107+             if  UNSTABLE_LANG_FEATURES . iter ( ) . find ( |f| name == f. name ) . is_some ( )  { 
107108                // When the ICE comes from core, alloc or std (approximation of the standard 
108109                // library), there's a chance that the person hitting the ICE may be using 
109110                // -Zbuild-std or similar with an untested target. The bug is probably in the 
0 commit comments