@@ -11,7 +11,8 @@ use rustc_ast::{
11
11
use rustc_attr as attr;
12
12
use rustc_data_structures:: flat_map_in_place:: FlatMapInPlace ;
13
13
use rustc_feature:: {
14
- ACCEPTED_FEATURES , AttributeSafety , Features , REMOVED_FEATURES , UNSTABLE_FEATURES ,
14
+ ACCEPTED_LANG_FEATURES , AttributeSafety , Features , REMOVED_LANG_FEATURES ,
15
+ UNSTABLE_LANG_FEATURES ,
15
16
} ;
16
17
use rustc_lint_defs:: BuiltinLintDiag ;
17
18
use rustc_parse:: validate_attr;
@@ -77,7 +78,7 @@ pub fn features(sess: &Session, krate_attrs: &[Attribute], crate_name: Symbol) -
77
78
} ;
78
79
79
80
// 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 ) {
81
82
sess. dcx ( ) . emit_err ( FeatureRemoved {
82
83
span : mi. span ( ) ,
83
84
reason : f. reason . map ( |reason| FeatureRemovedReason { reason } ) ,
@@ -86,7 +87,7 @@ pub fn features(sess: &Session, krate_attrs: &[Attribute], crate_name: Symbol) -
86
87
}
87
88
88
89
// 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 ) {
90
91
let since = Some ( Symbol :: intern ( f. since ) ) ;
91
92
features. set_enabled_lang_feature ( name, mi. span ( ) , since) ;
92
93
continue ;
@@ -103,7 +104,7 @@ pub fn features(sess: &Session, krate_attrs: &[Attribute], crate_name: Symbol) -
103
104
}
104
105
105
106
// 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 ( ) {
107
108
// When the ICE comes from core, alloc or std (approximation of the standard
108
109
// library), there's a chance that the person hitting the ICE may be using
109
110
// -Zbuild-std or similar with an untested target. The bug is probably in the
0 commit comments