mirror of
https://github.com/rust-lang/rust.git
synced 2025-11-24 14:18:28 +00:00
16 lines
375 B
Rust
16 lines
375 B
Rust
macro_rules! mac {
|
|
($attr_item: meta) => {
|
|
#[cfg($attr_item)]
|
|
//~^ ERROR expected a literal (`1u8`, `1.0f32`, `"string"`, etc.) here, found `meta` metavariable
|
|
struct S;
|
|
}
|
|
}
|
|
|
|
mac!(an(arbitrary token stream));
|
|
|
|
#[cfg(feature = -1)]
|
|
//~^ ERROR expected a literal (`1u8`, `1.0f32`, `"string"`, etc.) here, found `-`
|
|
fn handler() {}
|
|
|
|
fn main() {}
|