rust/tests/ui/asm/naked-invalid-attr.stderr
2025-04-20 11:18:38 +02:00

53 lines
1.4 KiB
Text

error: attribute should be applied to a function definition
--> $DIR/naked-invalid-attr.rs:13:1
|
LL | #[unsafe(naked)]
| ^^^^^^^^^^^^^^^^
LL | #[repr(C)]
LL | / struct S {
LL | | #[unsafe(naked)]
LL | | a: u32,
LL | | b: u32,
LL | | }
| |_- not a function definition
error: attribute should be applied to a function definition
--> $DIR/naked-invalid-attr.rs:16:5
|
LL | #[unsafe(naked)]
| ^^^^^^^^^^^^^^^^
LL | a: u32,
| ------ not a function definition
error: attribute should be applied to a function definition
--> $DIR/naked-invalid-attr.rs:51:5
|
LL | #[unsafe(naked)]
| ^^^^^^^^^^^^^^^^
LL | || {};
| ----- not a function definition
error: attribute should be applied to a function definition
--> $DIR/naked-invalid-attr.rs:22:5
|
LL | #[unsafe(naked)]
| ^^^^^^^^^^^^^^^^
LL | extern "C" fn invoke(&self);
| ---------------------------- not a function definition
error: attribute should be applied to a function definition
--> $DIR/naked-invalid-attr.rs:9:5
|
LL | #[unsafe(naked)]
| ^^^^^^^^^^^^^^^^
LL | fn f();
| ------- not a function definition
error: attribute should be applied to a function definition
--> $DIR/naked-invalid-attr.rs:4:1
|
LL | #![unsafe(naked)]
| ^^^^^^^^^^^^^^^^^ cannot be applied to crates
error: aborting due to 6 previous errors