]> git.lizzy.rs Git - rust.git/blob - src/test/ui/error-codes/E0517.stderr
Rollup merge of #59056 - scottmcm:even-fewer-lifetimes, r=sfackler
[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:1:8
3    |
4 LL | #[repr(C)]
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:4:8
11    |
12 LL | #[repr(packed)]
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:7:8
19    |
20 LL | #[repr(u8)]
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:10:8
27    |
28 LL |   #[repr(C)]
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`.