2020-09-10 13:54:17 -05:00
|
|
|
error[E0517]: attribute should be applied to a struct, enum, or union
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/E0517.rs:1:8
|
2018-02-07 21:35:35 -06:00
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | #[repr(C)]
|
2018-02-07 21:35:35 -06:00
|
|
|
| ^
|
2018-02-22 18:42:32 -06:00
|
|
|
LL | type Foo = u8;
|
2019-05-22 09:31:09 -05:00
|
|
|
| -------------- not a struct, enum, or union
|
2018-02-07 21:35:35 -06:00
|
|
|
|
2020-09-10 13:54:17 -05:00
|
|
|
error[E0517]: attribute should be applied to a struct or union
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/E0517.rs:4:8
|
2018-02-07 21:35:35 -06:00
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | #[repr(packed)]
|
2018-02-07 21:35:35 -06:00
|
|
|
| ^^^^^^
|
2018-02-22 18:42:32 -06:00
|
|
|
LL | enum Foo2 {Bar, Baz}
|
2018-02-07 21:35:35 -06:00
|
|
|
| -------------------- not a struct or union
|
|
|
|
|
2020-09-10 13:54:17 -05:00
|
|
|
error[E0517]: attribute should be applied to an enum
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/E0517.rs:7:8
|
2018-02-07 21:35:35 -06:00
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | #[repr(u8)]
|
2018-02-07 21:35:35 -06:00
|
|
|
| ^^
|
2018-02-22 18:42:32 -06:00
|
|
|
LL | struct Foo3 {bar: bool, baz: bool}
|
2018-02-07 21:35:35 -06:00
|
|
|
| ---------------------------------- not an enum
|
|
|
|
|
2020-09-10 13:54:17 -05:00
|
|
|
error[E0517]: attribute should be applied to a struct, enum, or union
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/E0517.rs:10:8
|
2018-02-07 21:35:35 -06:00
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | #[repr(C)]
|
2018-02-07 21:35:35 -06:00
|
|
|
| ^
|
2018-02-22 18:42:32 -06:00
|
|
|
LL | / impl Foo3 {
|
|
|
|
LL | | }
|
2019-05-22 09:31:09 -05:00
|
|
|
| |_- not a struct, enum, or union
|
2018-02-07 21:35:35 -06:00
|
|
|
|
|
|
|
error: aborting due to 4 previous errors
|
|
|
|
|
2018-03-03 08:59:40 -06:00
|
|
|
For more information about this error, try `rustc --explain E0517`.
|