]> git.lizzy.rs Git - rust.git/blob - src/test/ui/macros/macro-nested_stmt_macros.rs
Auto merge of #83152 - guswynn:jemallocator_part2, r=Mark-Simulacrum
[rust.git] / src / test / ui / macros / macro-nested_stmt_macros.rs
1 // run-pass
2 macro_rules! foo {
3     () => {
4         struct Bar;
5         struct Baz;
6     }
7 }
8
9 macro_rules! grault {
10     () => {
11         foo!();
12         struct Xyzzy;
13     }
14 }
15
16 fn static_assert_exists<T>() { }
17
18 fn main() {
19     grault!();
20     static_assert_exists::<Bar>();
21     static_assert_exists::<Baz>();
22     static_assert_exists::<Xyzzy>();
23 }