|
| 1 | +error[E0517]: attribute should be applied to a struct, enum, or union |
| 2 | + --> $DIR/naked-with-invalid-repr-attr.rs:7:8 |
| 3 | + | |
| 4 | +LL | #[repr(C)] |
| 5 | + | ^ |
| 6 | +... |
| 7 | +LL | / extern "C" fn example1() { |
| 8 | +LL | | |
| 9 | +LL | | unsafe { asm!("", options(noreturn)) } |
| 10 | +LL | | } |
| 11 | + | |_- not a struct, enum, or union |
| 12 | + |
| 13 | +error[E0517]: attribute should be applied to a struct, enum, or union |
| 14 | + --> $DIR/naked-with-invalid-repr-attr.rs:15:8 |
| 15 | + | |
| 16 | +LL | #[repr(transparent)] |
| 17 | + | ^^^^^^^^^^^ |
| 18 | +... |
| 19 | +LL | / extern "C" fn example2() { |
| 20 | +LL | | |
| 21 | +LL | | unsafe { asm!("", options(noreturn)) } |
| 22 | +LL | | } |
| 23 | + | |_- not a struct, enum, or union |
| 24 | + |
| 25 | +error[E0517]: attribute should be applied to a struct, enum, or union |
| 26 | + --> $DIR/naked-with-invalid-repr-attr.rs:23:19 |
| 27 | + | |
| 28 | +LL | #[repr(align(16), C)] |
| 29 | + | ^ |
| 30 | +... |
| 31 | +LL | / extern "C" fn example3() { |
| 32 | +LL | | |
| 33 | +LL | | unsafe { asm!("", options(noreturn)) } |
| 34 | +LL | | } |
| 35 | + | |_- not a struct, enum, or union |
| 36 | + |
| 37 | +error[E0517]: attribute should be applied to a struct, enum, or union |
| 38 | + --> $DIR/naked-with-invalid-repr-attr.rs:32:8 |
| 39 | + | |
| 40 | +LL | #[repr(C, packed)] |
| 41 | + | ^ |
| 42 | +... |
| 43 | +LL | / extern "C" fn example4() { |
| 44 | +LL | | |
| 45 | +LL | | |
| 46 | +LL | | unsafe { asm!("", options(noreturn)) } |
| 47 | +LL | | } |
| 48 | + | |_- not a struct, enum, or union |
| 49 | + |
| 50 | +error[E0517]: attribute should be applied to a struct or union |
| 51 | + --> $DIR/naked-with-invalid-repr-attr.rs:32:11 |
| 52 | + | |
| 53 | +LL | #[repr(C, packed)] |
| 54 | + | ^^^^^^ |
| 55 | +... |
| 56 | +LL | / extern "C" fn example4() { |
| 57 | +LL | | |
| 58 | +LL | | |
| 59 | +LL | | unsafe { asm!("", options(noreturn)) } |
| 60 | +LL | | } |
| 61 | + | |_- not a struct or union |
| 62 | + |
| 63 | +error[E0517]: attribute should be applied to an enum |
| 64 | + --> $DIR/naked-with-invalid-repr-attr.rs:42:8 |
| 65 | + | |
| 66 | +LL | #[repr(u8)] |
| 67 | + | ^^ |
| 68 | +... |
| 69 | +LL | / extern "C" fn example5() { |
| 70 | +LL | | |
| 71 | +LL | | unsafe { asm!("", options(noreturn)) } |
| 72 | +LL | | } |
| 73 | + | |_- not an enum |
| 74 | + |
| 75 | +error: aborting due to 6 previous errors |
| 76 | + |
| 77 | +For more information about this error, try `rustc --explain E0517`. |
0 commit comments