rust/tests/ui/cfg/cfg-macros-notfoo.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

25 lines
336 B
Rust
Raw Normal View History

//@ run-pass
// check that cfg correctly chooses between the macro impls (see also
// cfg-macros-foo.rs)
2025-03-29 17:24:03 +00:00
#[cfg(false)]
#[macro_use]
mod foo {
macro_rules! bar {
() => { true }
}
}
#[cfg(not(FALSE))]
#[macro_use]
mod foo {
macro_rules! bar {
() => { false }
}
}
pub fn main() {
assert!(!bar!())
}