File tree Expand file tree Collapse file tree 1 file changed +4
-8
lines changed
compiler/rustc_expand/src Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -38,13 +38,6 @@ pub struct StripUnconfigured<'a> {
38
38
}
39
39
40
40
pub fn features ( sess : & Session , krate_attrs : & [ Attribute ] ) -> Features {
41
- fn feature_removed ( sess : & Session , span : Span , reason : Option < & str > ) {
42
- sess. emit_err ( FeatureRemoved {
43
- span,
44
- reason : reason. map ( |reason| FeatureRemovedReason { reason } ) ,
45
- } ) ;
46
- }
47
-
48
41
fn active_features_up_to ( edition : Edition ) -> impl Iterator < Item = & ' static Feature > {
49
42
ACTIVE_FEATURES . iter ( ) . filter ( move |feature| {
50
43
if let Some ( feature_edition) = feature. edition {
@@ -167,7 +160,10 @@ pub fn features(sess: &Session, krate_attrs: &[Attribute]) -> Features {
167
160
if let FeatureState :: Removed { reason } | FeatureState :: Stabilized { reason } =
168
161
state
169
162
{
170
- feature_removed ( sess, mi. span ( ) , * reason) ;
163
+ sess. emit_err ( FeatureRemoved {
164
+ span : mi. span ( ) ,
165
+ reason : reason. map ( |reason| FeatureRemovedReason { reason } ) ,
166
+ } ) ;
171
167
continue ;
172
168
}
173
169
}
You can’t perform that action at this time.
0 commit comments