]> git.lizzy.rs Git - rust.git/blob - src/test/ui/error-codes/E0517.stderr
Auto merge of #54720 - davidtwco:issue-51191, r=nikomatsakis
[rust.git] / src / test / ui / error-codes / E0517.stderr
1 error[E0517]: attribute should be applied to struct, enum or union
2   --> $DIR/E0517.rs:11:8
3    |
4 LL | #[repr(C)] //~ ERROR: E0517
5    |        ^
6 LL | type Foo = u8;
7    | -------------- not a struct, enum or union
8
9 error[E0517]: attribute should be applied to struct or union
10   --> $DIR/E0517.rs:14:8
11    |
12 LL | #[repr(packed)] //~ ERROR: E0517
13    |        ^^^^^^
14 LL | enum Foo2 {Bar, Baz}
15    | -------------------- not a struct or union
16
17 error[E0517]: attribute should be applied to enum
18   --> $DIR/E0517.rs:17:8
19    |
20 LL | #[repr(u8)] //~ ERROR: E0517
21    |        ^^
22 LL | struct Foo3 {bar: bool, baz: bool}
23    | ---------------------------------- not an enum
24
25 error[E0517]: attribute should be applied to struct, enum or union
26   --> $DIR/E0517.rs:20:8
27    |
28 LL |   #[repr(C)] //~ ERROR: E0517
29    |          ^
30 LL | / impl Foo3 {
31 LL | | }
32    | |_- not a struct, enum or union
33
34 error: aborting due to 4 previous errors
35
36 For more information about this error, try `rustc --explain E0517`.