]> git.lizzy.rs Git - rust.git/blob - src/test/ui/marker_trait_attr/marker-attribute-on-non-trait.stderr
Rollup merge of #89945 - JohnTitor:we-now-specialize-clone-from-slice, r=the8472
[rust.git] / src / test / ui / marker_trait_attr / marker-attribute-on-non-trait.stderr
1 error: attribute can only be applied to a trait
2   --> $DIR/marker-attribute-on-non-trait.rs:3:1
3    |
4 LL | #[marker]
5    | ^^^^^^^^^
6 LL | struct Struct {}
7    | ---------------- not a trait
8
9 error: attribute can only be applied to a trait
10   --> $DIR/marker-attribute-on-non-trait.rs:6:1
11    |
12 LL | #[marker]
13    | ^^^^^^^^^
14 LL | impl Struct {}
15    | -------------- not a trait
16
17 error: attribute can only be applied to a trait
18   --> $DIR/marker-attribute-on-non-trait.rs:9:1
19    |
20 LL |   #[marker]
21    |   ^^^^^^^^^
22 LL | / union Union {
23 LL | |     x: i32,
24 LL | | }
25    | |_- not a trait
26
27 error: attribute can only be applied to a trait
28   --> $DIR/marker-attribute-on-non-trait.rs:14:1
29    |
30 LL | #[marker]
31    | ^^^^^^^^^
32 LL | const CONST: usize = 10;
33    | ------------------------ not a trait
34
35 error: attribute can only be applied to a trait
36   --> $DIR/marker-attribute-on-non-trait.rs:17:1
37    |
38 LL | #[marker]
39    | ^^^^^^^^^
40 LL | fn function() {}
41    | ---------------- not a trait
42
43 error: attribute can only be applied to a trait
44   --> $DIR/marker-attribute-on-non-trait.rs:20:1
45    |
46 LL | #[marker]
47    | ^^^^^^^^^
48 LL | type Type = ();
49    | --------------- not a trait
50
51 error: aborting due to 6 previous errors
52