summaryrefslogtreecommitdiffstats
path: root/src/test/ui/macros/macro-with-attrs1.rs
blob: 4e943b224cd8b0751fbb232add4e4d0f60863ea2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// run-pass
// compile-flags: --cfg foo


#[cfg(foo)]
macro_rules! foo { () => (1) }

#[cfg(not(foo))]
macro_rules! foo { () => (2) }

pub fn main() {
    assert_eq!(foo!(), 1);
}