rust/tests/ui/malformed/malformed-interpolated.rs
2023-01-11 09:32:08 +00:00

17 lines
361 B
Rust

#![feature(rustc_attrs)]
macro_rules! check {
($expr: expr) => (
#[rustc_dummy = $expr]
use main as _;
);
}
check!("0"); // OK
check!(0); // OK
check!(0u8); //~ ERROR suffixed literals are not allowed in attributes
check!(-0); //~ ERROR unexpected expression: `-0`
check!(0 + 0); //~ ERROR unexpected expression: `0 + 0`
fn main() {}