rust/tests/ui/parser/attribute/attr-bad-meta-4.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

18 lines
453 B
Rust
Raw Normal View History

macro_rules! mac {
($attr_item: meta) => {
#[cfg($attr_item)]
2024-05-05 23:25:49 +00:00
//~^ ERROR expected unsuffixed literal, found `an(arbitrary token stream)`
//~| ERROR expected unsuffixed literal, found `an(arbitrary token stream)`
struct S;
}
}
mac!(an(arbitrary token stream));
2024-05-05 23:25:49 +00:00
#[cfg(feature = -1)]
//~^ ERROR expected unsuffixed literal, found `-`
//~| ERROR expected unsuffixed literal, found `-`
fn handler() {}
fn main() {}