]> git.lizzy.rs Git - rust.git/blob - src/test/ui/used.rs
Auto merge of #103600 - compiler-errors:early-binder-nits, r=spastorino
[rust.git] / src / test / ui / used.rs
1 #[used]
2 static FOO: u32 = 0; // OK
3
4 #[used] //~ ERROR attribute must be applied to a `static` variable
5 fn foo() {}
6
7 #[used] //~ ERROR attribute must be applied to a `static` variable
8 struct Foo {}
9
10 #[used] //~ ERROR attribute must be applied to a `static` variable
11 trait Bar {}
12
13 #[used] //~ ERROR attribute must be applied to a `static` variable
14 impl Bar for Foo {}
15
16 fn main() {}