]> git.lizzy.rs Git - rust.git/blob - src/test/ui/cfg/cfg-macros-notfoo.rs
Rollup merge of #97786 - ferrocene:pa-fix-simulate-remap-prefix, r=Mark-Simulacrum
[rust.git] / src / test / ui / cfg / cfg-macros-notfoo.rs
1 // run-pass
2 // compile-flags:
3
4 // check that cfg correctly chooses between the macro impls (see also
5 // cfg-macros-foo.rs)
6
7
8 #[cfg(foo)]
9 #[macro_use]
10 mod foo {
11     macro_rules! bar {
12         () => { true }
13     }
14 }
15
16 #[cfg(not(foo))]
17 #[macro_use]
18 mod foo {
19     macro_rules! bar {
20         () => { false }
21     }
22 }
23
24 pub fn main() {
25     assert!(!bar!())
26 }