pub fn matches(&self, parse_sess: &ParseSess, features: Option<&Features>) -> bool {
        match *self {
            Cfg::False => false,
            Cfg::True => true,
            Cfg::Not(ref child) => !child.matches(parse_sess, features),
            Cfg::All(ref sub_cfgs) => {
                sub_cfgs.iter().all(|sub_cfg| sub_cfg.matches(parse_sess, features))
            },
            Cfg::Any(ref sub_cfgs) => {
                sub_cfgs.iter().any(|sub_cfg| sub_cfg.matches(parse_sess, features))
            },
            Cfg::Cfg(name, value) => parse_sess.config.contains(&(name, value)),
        }
    }
/// Checks whether the given configuration can be matched in the current session.
///
/// Equivalent to `attr::cfg_matches`.
// FIXME: Actually make use of `features`.
Checks whether the given configuration can be matched in the current session.
Checks whether the given configuration can be matched in the current session .
pub fn matches(&self, parse_sess: &ParseSess, features: Option<&Features>) -> bool {
        match *self {
            Cfg::False => false,
            Cfg::True => true,
            Cfg::Not(ref child) => !child.matches(parse_sess, features),
            Cfg::All(ref sub_cfgs) => {
                sub_cfgs.iter().all(|sub_cfg| sub_cfg.matches(parse_sess, features))
            },
            Cfg::Any(ref sub_cfgs) => {
                sub_cfgs.iter().any(|sub_cfg| sub_cfg.matches(parse_sess, features))
            },
            Cfg::Cfg(name, value) => parse_sess.config.contains(&(name, value)),
        }
    }
pub fn matches ( & self , parse_sess : & ParseSess , features : Option < & Features > ) -> bool { match * self { Cfg :: False => false , Cfg :: True => true , Cfg :: Not ( ref child ) => ! child . matches ( parse_sess , features ) , Cfg :: All ( ref sub_cfgs ) => { sub_cfgs . iter ( ) . all ( | sub_cfg | sub_cfg . matches ( parse_sess , features ) ) } , Cfg :: Any ( ref sub_cfgs ) => { sub_cfgs . iter ( ) . any ( | sub_cfg | sub_cfg . matches ( parse_sess , features ) ) } , Cfg :: Cfg ( name , value ) => parse_sess . config . contains ( & ( name , value ) ) , } }
Checks whether the given configuration can be matched in the current session.
Checks whether the given configuration can be matched in the current session .
&self
parse_sess
&ParseSess
features
Option<&Features>
&self
parse_sess
&ParseSess
features
Option<&Features>