1 #![feature(rustc_attrs)] 2 3 macro_rules! check { 4 ($expr: expr) => ( 5 #[rustc_dummy = $expr] 6 use main as _; 7 ); 8 } 9 10 check!("0"); // OK 11 check!(0); // OK 12 check!(0u8); //~ ERROR suffixed literals are not allowed in attributes 13 check!(-0); //~ ERROR unexpected token: `-0` 14 check!(0 + 0); //~ ERROR unexpected token: `0 + 0` 15 main()16fn main() {} 17