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 21:05:03 +00:00
macro_rules! foo { () => (1) }
#[cfg(not(foo))]
2015-01-25 21:05:03 +00:00
macro_rules! foo { () => (2) }
pub fn main() {
2015-01-25 21:05:03 +00:00
assert_eq!(foo!(), 2);
}