2015-11-23 21:06:51 +01:00
|
|
|
// (typeof used because it's surprisingly hard to find an unparsed token after a stmt)
|
|
|
|
macro_rules! m {
|
2016-04-21 02:03:29 +03:00
|
|
|
() => ( i ; typeof ); //~ ERROR expected expression, found reserved keyword `typeof`
|
2015-11-23 21:06:51 +01:00
|
|
|
//~| ERROR macro expansion ignores token `typeof`
|
|
|
|
//~| ERROR macro expansion ignores token `;`
|
|
|
|
//~| ERROR macro expansion ignores token `;`
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
2017-12-10 23:29:24 +03:00
|
|
|
let a: m!();
|
|
|
|
let i = m!();
|
2015-11-23 21:06:51 +01:00
|
|
|
match 0 {
|
2017-12-10 23:29:24 +03:00
|
|
|
m!() => {}
|
2015-11-23 21:06:51 +01:00
|
|
|
}
|
|
|
|
|
2017-12-10 23:29:24 +03:00
|
|
|
m!();
|
2015-11-23 21:06:51 +01:00
|
|
|
}
|