Function syntax::attr::test_cfg[src]
pub fn test_cfg<AM: AttrMetaMethods, It: Iterator<AM>>(cfg: &[Gc<MetaItem>], metas: It) -> bool
Tests if any cfg(...) meta items in metas match cfg. e.g.
test_cfg([foo="a", bar], [cfg(foo), cfg(bar)]) == true
test_cfg([foo="a", bar], [cfg(not(bar))]) == false
test_cfg([foo="a", bar], [cfg(bar, foo="a")]) == true
test_cfg([foo="a", bar], [cfg(bar, foo="b")]) == false