Closed
Description
What it does
The lint should lint against #[no_mangle]
on functions with the rust abi. See Rust-for-Linux/linux#967 for an example of this kind of issue.
Lint Name
no_mangle_with_rust_abi
Category
No response
Advantage
The Rust ABI is not stable, but in many simple cases matches enough with the C ABI that it is possible to forget to add extern "C"
to a function called from C. Changes to the Rust ABI can break this at any point.
Drawbacks
No response
Example
#[no_mangle]
fn foo() {}
Should instead be written as:
#[no_mangle]
extern "C" fn foo() {}