summaryrefslogtreecommitdiffstats
path: root/tests/ui/used.rs
blob: f008724f428b3e68a7f9cf78670bdeac09c542c0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#[used]
static FOO: u32 = 0; // OK

#[used] //~ ERROR attribute must be applied to a `static` variable
fn foo() {}

#[used] //~ ERROR attribute must be applied to a `static` variable
struct Foo {}

#[used] //~ ERROR attribute must be applied to a `static` variable
trait Bar {}

#[used] //~ ERROR attribute must be applied to a `static` variable
impl Bar for Foo {}

fn main() {}