@@ -8,7 +8,6 @@ use std::{mem, ops};
8
8
9
9
use rustc_ast:: { LitKind , MetaItem , MetaItemInner , MetaItemKind , MetaItemLit } ;
10
10
use rustc_data_structures:: fx:: FxHashSet ;
11
- use rustc_feature:: Features ;
12
11
use rustc_session:: parse:: ParseSess ;
13
12
use rustc_span:: Span ;
14
13
use rustc_span:: symbol:: { Symbol , sym} ;
@@ -132,18 +131,13 @@ impl Cfg {
132
131
/// Checks whether the given configuration can be matched in the current session.
133
132
///
134
133
/// 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 {
137
135
match * self {
138
136
Cfg :: False => false ,
139
137
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) ) ,
147
141
Cfg :: Cfg ( name, value) => psess. config . contains ( & ( name, value) ) ,
148
142
}
149
143
}
0 commit comments