]> git.proxmox.com Git - rustc.git/blob - tests/ui/cfg/cfg-macros-notfoo.rs
New upstream version 1.68.2+dfsg1
[rustc.git] / tests / 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 }