Static rustc_lint::builtin::UNSUPPORTED_NAKED_FUNCTIONS [−][src]
pub static UNSUPPORTED_NAKED_FUNCTIONS: &'static LintExpand description
The unsupported_naked_functions lint detects naked function
definitions that are unsupported but were previously accepted.
Example
#![feature(naked_functions)]
#[naked]
pub extern "C" fn f() -> u32 {
42
}{{produces}}
Explanation
The naked functions must be defined using a single inline assembly block.
The execution must never fall through past the end of the assembly
code so the block must use noreturn option. The asm block can also
use att_syntax option, but other options are not allowed.
The asm block must not contain any operands other than const and
sym. Additionally, naked function should specify a non-Rust ABI.
Naked functions cannot be inlined. All forms of the inline attribute
are prohibited.
While other definitions of naked functions were previously accepted, they are unsupported and might not work reliably. This is a future-incompatible lint that will transition into hard error in the future.