Note: there was an existing code path involving `Interpolated` in `MetaItem::from_tokens` that was dead. This commit transfers that to the new form, but puts an `unreachable!` call inside it.
18 lines
435 B
Rust
18 lines
435 B
Rust
macro_rules! mac {
|
|
($attr_item: meta) => {
|
|
#[cfg($attr_item)]
|
|
//~^ ERROR expected unsuffixed literal, found `meta` metavariable
|
|
//~| ERROR expected unsuffixed literal, found `meta` metavariable
|
|
struct S;
|
|
}
|
|
}
|
|
|
|
mac!(an(arbitrary token stream));
|
|
|
|
#[cfg(feature = -1)]
|
|
//~^ ERROR expected unsuffixed literal, found `-`
|
|
//~| ERROR expected unsuffixed literal, found `-`
|
|
fn handler() {}
|
|
|
|
fn main() {}
|