2018-08-08 07:28:26 -05:00
|
|
|
error[E0517]: attribute should be applied to struct
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/repr-transparent-other-items.rs:3:8
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | #[repr(transparent)]
|
2018-08-08 07:28:26 -05:00
|
|
|
| ^^^^^^^^^^^
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | enum Void {}
|
2018-08-08 07:28:26 -05:00
|
|
|
| ------------ not a struct
|
|
|
|
|
|
|
|
error[E0517]: attribute should be applied to struct
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/repr-transparent-other-items.rs:6:8
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | #[repr(transparent)]
|
2018-08-08 07:28:26 -05:00
|
|
|
| ^^^^^^^^^^^
|
|
|
|
LL | / enum FieldlessEnum {
|
|
|
|
LL | | Foo,
|
|
|
|
LL | | Bar,
|
|
|
|
LL | | }
|
|
|
|
| |_- not a struct
|
|
|
|
|
|
|
|
error[E0517]: attribute should be applied to struct
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/repr-transparent-other-items.rs:12:8
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | #[repr(transparent)]
|
2018-08-08 07:28:26 -05:00
|
|
|
| ^^^^^^^^^^^
|
|
|
|
LL | / enum Enum {
|
|
|
|
LL | | Foo(String),
|
|
|
|
LL | | Bar(u32),
|
|
|
|
LL | | }
|
|
|
|
| |_- not a struct
|
|
|
|
|
|
|
|
error[E0517]: attribute should be applied to struct
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/repr-transparent-other-items.rs:18:8
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | #[repr(transparent)]
|
2018-08-08 07:28:26 -05:00
|
|
|
| ^^^^^^^^^^^
|
|
|
|
LL | / union Foo {
|
|
|
|
LL | | u: u32,
|
|
|
|
LL | | s: i32
|
|
|
|
LL | | }
|
|
|
|
| |_- not a struct
|
|
|
|
|
|
|
|
error[E0517]: attribute should be applied to struct
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/repr-transparent-other-items.rs:24:8
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | #[repr(transparent)]
|
2018-08-08 07:28:26 -05:00
|
|
|
| ^^^^^^^^^^^
|
|
|
|
LL | fn cant_repr_this() {}
|
|
|
|
| ---------------------- not a struct
|
|
|
|
|
|
|
|
error[E0517]: attribute should be applied to struct
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/repr-transparent-other-items.rs:27:8
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | #[repr(transparent)]
|
2018-08-08 07:28:26 -05:00
|
|
|
| ^^^^^^^^^^^
|
|
|
|
LL | static CANT_REPR_THIS: u32 = 0;
|
|
|
|
| ------------------------------- not a struct
|
|
|
|
|
|
|
|
error[E0084]: unsupported representation for zero-variant enum
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/repr-transparent-other-items.rs:3:1
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | #[repr(transparent)]
|
2018-08-08 07:28:26 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | enum Void {}
|
2018-08-08 07:28:26 -05:00
|
|
|
| ------------ zero-variant enum
|
|
|
|
|
2018-08-22 18:19:38 -05:00
|
|
|
error: aborting due to 7 previous errors
|
2018-08-08 07:28:26 -05:00
|
|
|
|
2019-04-17 12:26:38 -05:00
|
|
|
Some errors have detailed explanations: E0084, E0517.
|
2018-08-08 07:28:26 -05:00
|
|
|
For more information about an error, try `rustc --explain E0084`.
|