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