1 // Copyright 2015 The Rust Project Developers. See the COPYRIGHT
2 // file at the top-level directory of this distribution and at
3 // http://rust-lang.org/COPYRIGHT.
5 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8 // option. This file may not be copied, modified, or distributed
9 // except according to those terms.
11 #![feature(type_macros)]
13 // (typeof used because it's surprisingly hard to find an unparsed token after a stmt)
15 () => ( i ; typeof ); //~ ERROR `typeof` is a reserved keyword
16 //~| ERROR macro expansion ignores token `typeof`
17 //~| ERROR macro expansion ignores token `typeof`
18 //~| ERROR macro expansion ignores token `;`
19 //~| ERROR macro expansion ignores token `;`
20 //~| ERROR macro expansion ignores token `i`
23 m!(); //~ NOTE the usage of `m!` is likely invalid in this item context
26 let a: m!(); //~ NOTE the usage of `m!` is likely invalid in this type context
27 let i = m!(); //~ NOTE the usage of `m!` is likely invalid in this expression context
29 m!() => {} //~ NOTE the usage of `m!` is likely invalid in this pattern context
32 m!(); //~ NOTE the usage of `m!` is likely invalid in this statement context