blob: 4f6ec583db219f1d846a410728edc87157b44048 [file] [log] [blame]
//@ run-pass
//@ compile-flags: --cfg foo --check-cfg=cfg(foo)
// check that cfg correctly chooses between the macro impls (see also
// cfg-macros-notfoo.rs)
#[cfg(foo)]
#[macro_use]
mod foo {
macro_rules! bar {
() => { true }
}
}
#[cfg(not(foo))]
#[macro_use]
mod foo {
macro_rules! bar {
() => { false }
}
}
pub fn main() {
assert!(bar!())
}