2020-09-10 13:54:17 -05:00
|
|
|
error[E0517]: attribute should be applied to a struct, enum, or union
|
2019-05-27 00:26:11 -05:00
|
|
|
--> $DIR/attr-usage-repr.rs:3:8
|
2018-01-01 14:42:12 -06:00
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | #[repr(C)]
|
2018-01-01 14:42:12 -06:00
|
|
|
| ^
|
2018-02-22 18:42:32 -06:00
|
|
|
LL | fn f() {}
|
2019-05-22 09:31:09 -05:00
|
|
|
| --------- not a struct, enum, or union
|
2018-01-01 14:42:12 -06:00
|
|
|
|
2020-09-10 13:54:17 -05:00
|
|
|
error[E0517]: attribute should be applied to an enum
|
2019-05-27 00:26:11 -05:00
|
|
|
--> $DIR/attr-usage-repr.rs:15:8
|
2018-01-01 14:42:12 -06:00
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | #[repr(i8)]
|
2018-01-01 14:42:12 -06:00
|
|
|
| ^^
|
2018-02-22 18:42:32 -06:00
|
|
|
LL | struct SInt(f64, f64);
|
2018-01-01 14:42:12 -06:00
|
|
|
| ---------------------- not an enum
|
|
|
|
|
2020-09-10 13:54:17 -05:00
|
|
|
error[E0517]: attribute should be applied to a struct or union
|
2019-05-27 00:26:11 -05:00
|
|
|
--> $DIR/attr-usage-repr.rs:24:8
|
2018-01-01 14:42:12 -06:00
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | #[repr(packed)]
|
2018-01-01 14:42:12 -06:00
|
|
|
| ^^^^^^
|
2018-02-22 18:42:32 -06:00
|
|
|
LL | enum EPacked { A, B }
|
2018-01-01 14:42:12 -06:00
|
|
|
| --------------------- not a struct or union
|
|
|
|
|
2020-09-10 13:54:17 -05:00
|
|
|
error[E0517]: attribute should be applied to a struct
|
2019-05-27 00:26:11 -05:00
|
|
|
--> $DIR/attr-usage-repr.rs:27:8
|
2018-01-01 14:42:12 -06:00
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | #[repr(simd)]
|
2018-01-01 14:42:12 -06:00
|
|
|
| ^^^^
|
2018-02-22 18:42:32 -06:00
|
|
|
LL | enum ESimd { A, B }
|
2018-01-01 14:42:12 -06:00
|
|
|
| ------------------- not a struct
|
|
|
|
|
2019-01-30 07:14:16 -06:00
|
|
|
error: aborting due to 4 previous errors
|
2018-01-01 14:42:12 -06:00
|
|
|
|
2018-03-03 08:59:40 -06:00
|
|
|
For more information about this error, try `rustc --explain E0517`.
|