@@ -8,7 +8,6 @@ use std::{mem, ops};
88
99use rustc_ast:: { LitKind , MetaItem , MetaItemInner , MetaItemKind , MetaItemLit } ;
1010use rustc_data_structures:: fx:: FxHashSet ;
11- use rustc_feature:: Features ;
1211use rustc_session:: parse:: ParseSess ;
1312use rustc_span:: Span ;
1413use rustc_span:: symbol:: { Symbol , sym} ;
@@ -132,18 +131,13 @@ impl Cfg {
132131 /// Checks whether the given configuration can be matched in the current session.
133132 ///
134133 /// Equivalent to `attr::cfg_matches`.
135- // FIXME: Actually make use of `features`.
136- pub ( crate ) fn matches ( & self , psess : & ParseSess , features : Option < & Features > ) -> bool {
134+ pub ( crate ) fn matches ( & self , psess : & ParseSess ) -> bool {
137135 match * self {
138136 Cfg :: False => false ,
139137 Cfg :: True => true ,
140- Cfg :: Not ( ref child) => !child. matches ( psess, features) ,
141- Cfg :: All ( ref sub_cfgs) => {
142- sub_cfgs. iter ( ) . all ( |sub_cfg| sub_cfg. matches ( psess, features) )
143- }
144- Cfg :: Any ( ref sub_cfgs) => {
145- sub_cfgs. iter ( ) . any ( |sub_cfg| sub_cfg. matches ( psess, features) )
146- }
138+ Cfg :: Not ( ref child) => !child. matches ( psess) ,
139+ Cfg :: All ( ref sub_cfgs) => sub_cfgs. iter ( ) . all ( |sub_cfg| sub_cfg. matches ( psess) ) ,
140+ Cfg :: Any ( ref sub_cfgs) => sub_cfgs. iter ( ) . any ( |sub_cfg| sub_cfg. matches ( psess) ) ,
147141 Cfg :: Cfg ( name, value) => psess. config . contains ( & ( name, value) ) ,
148142 }
149143 }
0 commit comments