Debian Codegraph @

gcc/testsuite/rust/compile/macros/builtin/eager1.rs

raw
1 // { dg-additional-options "-fdump-tree-gimple" }
2 #![feature(rustc_attrs)]
3
4 #[rustc_builtin_macro]
5 macro_rules! concat {
6 () => {{}};
7 }
8
9 macro_rules! a {
10 () => { "test" };
11 }
12
13 macro_rules! b {
14 () => { "canary" };
15 }
16
17 fn main() {
18 // { dg-final { scan-assembler {"test1canary"} } }
19 let _ = concat!(a!(), 1, b!());
20 // should not error
21 concat!(a!(), true, b!(),);
22 }