rust/tests/ui/macros/macro-with-attrs2.rs

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

12 lines
151 B
Rust
Raw Normal View History

// run-pass
#[cfg(foo)]
2015-01-25 15:05:03 -06:00
macro_rules! foo { () => (1) }
#[cfg(not(foo))]
2015-01-25 15:05:03 -06:00
macro_rules! foo { () => (2) }
pub fn main() {
2015-01-25 15:05:03 -06:00
assert_eq!(foo!(), 2);
}