Static rustc_lint::builtin::UNDEFINED_NAKED_FUNCTION_ABI [−][src]
pub static UNDEFINED_NAKED_FUNCTION_ABI: &'static Lint
Expand description
The undefined_naked_function_abi lint detects naked function definitions that
either do not specify an ABI or specify the Rust ABI.
Example
#![feature(naked_functions)] #![feature(asm)] #[naked] pub fn default_abi() -> u32 { unsafe { asm!("", options(noreturn)); } } #[naked] pub extern "Rust" fn rust_abi() -> u32 { unsafe { asm!("", options(noreturn)); } }
{{produces}}
Explanation
The Rust ABI is currently undefined. Therefore, naked functions should specify a non-Rust ABI.