]> git.lizzy.rs Git - rust.git/blob - src/test/ui/macros/macro-context.rs
Auto merge of #61741 - Centril:rollup-fgro5kz, r=Centril
[rust.git] / src / test / ui / macros / macro-context.rs
1 // (typeof used because it's surprisingly hard to find an unparsed token after a stmt)
2 macro_rules! m {
3     () => ( i ; typeof );   //~ ERROR expected expression, found reserved keyword `typeof`
4                             //~| ERROR macro expansion ignores token `typeof`
5                             //~| ERROR macro expansion ignores token `;`
6                             //~| ERROR macro expansion ignores token `;`
7 }
8
9 fn main() {
10     let a: m!();
11     let i = m!();
12     match 0 {
13         m!() => {}
14     }
15
16     m!();
17 }