Closed
Description
The following code fails to compile due to attribute checks on naked functions being too strict.
#[rustfmt::skip]
#[unsafe(naked)]
extern "C" fn naked() {
core::arch::naked_asm!("");
}
error[E0736]: attribute incompatible with `#[unsafe(naked)]`
--> src/lib.rs:1:1
|
1 | #[rustfmt::skip]
| ^^^^^^^^^^^^^^^^ the `rustfmt::skip` attribute is incompatible with `#[unsafe(naked)]`
2 | #[unsafe(naked)]
| ---------------- function marked with `#[unsafe(naked)]` here
For more information about this error, try `rustc --explain E0736`.
error: could not compile `playground` (lib) due to 1 previous error
cc @folkertdev