]> git.lizzy.rs Git - rust.git/blob - tests/ui/marker_trait_attr/marker-attribute-on-non-trait.rs
Auto merge of #106833 - JohnTitor:rollup-z8398jk, r=JohnTitor
[rust.git] / tests / ui / marker_trait_attr / marker-attribute-on-non-trait.rs
1 #![feature(marker_trait_attr)]
2
3 #[marker] //~ ERROR attribute should be applied to a trait
4 struct Struct {}
5
6 #[marker] //~ ERROR attribute should be applied to a trait
7 impl Struct {}
8
9 #[marker] //~ ERROR attribute should be applied to a trait
10 union Union {
11     x: i32,
12 }
13
14 #[marker] //~ ERROR attribute should be applied to a trait
15 const CONST: usize = 10;
16
17 #[marker] //~ ERROR attribute should be applied to a trait
18 fn function() {}
19
20 #[marker] //~ ERROR attribute should be applied to a trait
21 type Type = ();
22
23 fn main() {}