2024-03-20 06:47:59 +11:00
|
|
|
macro_rules! mac {
|
|
|
|
|
($attr_item: meta) => {
|
|
|
|
|
#[cfg($attr_item)]
|
2025-07-31 15:38:44 +02:00
|
|
|
//~^ ERROR expected a literal (`1u8`, `1.0f32`, `"string"`, etc.) here, found `meta` metavariable
|
2024-03-20 06:47:59 +11:00
|
|
|
struct S;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
mac!(an(arbitrary token stream));
|
|
|
|
|
|
2024-05-06 01:25:49 +02:00
|
|
|
#[cfg(feature = -1)]
|
2025-07-31 15:38:44 +02:00
|
|
|
//~^ ERROR expected a literal (`1u8`, `1.0f32`, `"string"`, etc.) here, found `-`
|
2024-05-06 01:25:49 +02:00
|
|
|
fn handler() {}
|
|
|
|
|
|
2024-03-20 06:47:59 +11:00
|
|
|
fn main() {}
|