]> git.lizzy.rs Git - rust.git/blob - tests/ui/used.rs
Rollup merge of #107769 - compiler-errors:pointer-like, r=eholk
[rust.git] / tests / 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() {}