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> {
3838}
3939
4040pub 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-
4841 fn active_features_up_to ( edition : Edition ) -> impl Iterator < Item = & ' static Feature > {
4942 ACTIVE_FEATURES . iter ( ) . filter ( move |feature| {
5043 if let Some ( feature_edition) = feature. edition {
@@ -167,7 +160,10 @@ pub fn features(sess: &Session, krate_attrs: &[Attribute]) -> Features {
167160 if let FeatureState :: Removed { reason } | FeatureState :: Stabilized { reason } =
168161 state
169162 {
170- feature_removed ( sess, mi. span ( ) , * reason) ;
163+ sess. emit_err ( FeatureRemoved {
164+ span : mi. span ( ) ,
165+ reason : reason. map ( |reason| FeatureRemovedReason { reason } ) ,
166+ } ) ;
171167 continue ;
172168 }
173169 }
You can’t perform that action at this time.
0 commit comments