diff options
Diffstat (limited to 'tests/ui/macros/macro-with-attrs1.rs')
-rw-r--r-- | tests/ui/macros/macro-with-attrs1.rs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/ui/macros/macro-with-attrs1.rs b/tests/ui/macros/macro-with-attrs1.rs new file mode 100644 index 000000000..4e943b224 --- /dev/null +++ b/tests/ui/macros/macro-with-attrs1.rs @@ -0,0 +1,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); +} |