2018-08-30 14:18:55 +02:00
|
|
|
// run-pass
|
2018-09-25 23:51:35 +02:00
|
|
|
#![allow(dead_code)]
|
2015-04-07 08:21:18 -05:00
|
|
|
macro_rules! foo {
|
|
|
|
|
() => {
|
|
|
|
|
struct Bar;
|
|
|
|
|
struct Baz;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
macro_rules! grault {
|
|
|
|
|
() => {{
|
|
|
|
|
foo!();
|
|
|
|
|
struct Xyzzy;
|
|
|
|
|
0
|
|
|
|
|
}}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
|
let x = grault!();
|
|
|
|
|
assert_eq!(x, 0);
|
|
|
|
|
}
|