]> git.lizzy.rs Git - rust.git/blob - src/test/ui/macros/macro-context.rs
Merge commit '3e4179766bcecd712824da04356621b8df012ea4' into sync-from-clippy
[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                             //~| ERROR cannot find type `i` in this scope
8                             //~| ERROR cannot find value `i` in this scope
9 }
10
11 fn main() {
12     let a: m!();
13     let i = m!();
14     match 0 {
15         m!() => {}
16     }
17
18     m!();
19 }