about summary refs log tree commit diff
path: root/tests/ui/parser/attribute/attr-bad-meta-4.rs
blob: 606b41e89a5f5d6ae1fc6f21ef54902bfd4553f0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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() {}