mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 09:14:20 +00:00
78 lines
1.9 KiB
Plaintext
78 lines
1.9 KiB
Plaintext
error[E0517]: attribute should be applied to a struct, enum, or union
|
|
--> $DIR/naked-with-invalid-repr-attr.rs:7:8
|
|
|
|
|
LL | #[repr(C)]
|
|
| ^
|
|
...
|
|
LL | / extern "C" fn example1() {
|
|
LL | |
|
|
LL | | unsafe { asm!("", options(noreturn)) }
|
|
LL | | }
|
|
| |_- not a struct, enum, or union
|
|
|
|
error[E0517]: attribute should be applied to a struct, enum, or union
|
|
--> $DIR/naked-with-invalid-repr-attr.rs:15:8
|
|
|
|
|
LL | #[repr(transparent)]
|
|
| ^^^^^^^^^^^
|
|
...
|
|
LL | / extern "C" fn example2() {
|
|
LL | |
|
|
LL | | unsafe { asm!("", options(noreturn)) }
|
|
LL | | }
|
|
| |_- not a struct, enum, or union
|
|
|
|
error[E0517]: attribute should be applied to a struct, enum, or union
|
|
--> $DIR/naked-with-invalid-repr-attr.rs:23:19
|
|
|
|
|
LL | #[repr(align(16), C)]
|
|
| ^
|
|
...
|
|
LL | / extern "C" fn example3() {
|
|
LL | |
|
|
LL | | unsafe { asm!("", options(noreturn)) }
|
|
LL | | }
|
|
| |_- not a struct, enum, or union
|
|
|
|
error[E0517]: attribute should be applied to a struct, enum, or union
|
|
--> $DIR/naked-with-invalid-repr-attr.rs:32:8
|
|
|
|
|
LL | #[repr(C, packed)]
|
|
| ^
|
|
...
|
|
LL | / extern "C" fn example4() {
|
|
LL | |
|
|
LL | |
|
|
LL | | unsafe { asm!("", options(noreturn)) }
|
|
LL | | }
|
|
| |_- not a struct, enum, or union
|
|
|
|
error[E0517]: attribute should be applied to a struct or union
|
|
--> $DIR/naked-with-invalid-repr-attr.rs:32:11
|
|
|
|
|
LL | #[repr(C, packed)]
|
|
| ^^^^^^
|
|
...
|
|
LL | / extern "C" fn example4() {
|
|
LL | |
|
|
LL | |
|
|
LL | | unsafe { asm!("", options(noreturn)) }
|
|
LL | | }
|
|
| |_- not a struct or union
|
|
|
|
error[E0517]: attribute should be applied to an enum
|
|
--> $DIR/naked-with-invalid-repr-attr.rs:42:8
|
|
|
|
|
LL | #[repr(u8)]
|
|
| ^^
|
|
...
|
|
LL | / extern "C" fn example5() {
|
|
LL | |
|
|
LL | | unsafe { asm!("", options(noreturn)) }
|
|
LL | | }
|
|
| |_- not an enum
|
|
|
|
error: aborting due to 6 previous errors
|
|
|
|
For more information about this error, try `rustc --explain E0517`.
|