rust/tests/ui/repr/repr-transparent-other-item...

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

20 lines
644 B
Plaintext
Raw Normal View History

error[E0517]: attribute should be applied to a struct, enum, or union
2018-12-25 23:56:47 +08:00
--> $DIR/repr-transparent-other-items.rs:3:8
2018-08-08 20:28:26 +08:00
|
2019-03-09 20:03:44 +08:00
LL | #[repr(transparent)]
2018-08-08 20:28:26 +08:00
| ^^^^^^^^^^^
LL | fn cant_repr_this() {}
| ---------------------- not a struct, enum, or union
2018-08-08 20:28:26 +08:00
error[E0517]: attribute should be applied to a struct, enum, or union
--> $DIR/repr-transparent-other-items.rs:6:8
2018-08-08 20:28:26 +08:00
|
2019-03-09 20:03:44 +08:00
LL | #[repr(transparent)]
2018-08-08 20:28:26 +08:00
| ^^^^^^^^^^^
LL | static CANT_REPR_THIS: u32 = 0;
| ------------------------------- not a struct, enum, or union
2018-08-08 20:28:26 +08:00
error: aborting due to 2 previous errors
2018-08-08 20:28:26 +08:00
For more information about this error, try `rustc --explain E0517`.