clippy_lint: Test for BoxedLocal false-positive in C-FFI and fix C-FFI Abi comparison.
This commit is contained in:
parent
738ed38306
commit
15150c07ea
@ -68,7 +68,7 @@ fn check_fn(
|
||||
hir_id: HirId,
|
||||
) {
|
||||
if let Some(header) = fn_kind.header() {
|
||||
if header.abi == Abi::Cdecl {
|
||||
if header.abi == Abi::C {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -174,3 +174,8 @@ fn closure_borrow(x: Box<A>) {
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
/// Issue #5542
|
||||
///
|
||||
/// This shouldn't warn for `boxed_local` as it is a function implemented in C.
|
||||
pub extern "C" fn do_now_warn_me(_c_pointer: Box<String>) -> () {}
|
||||
|
Loading…
Reference in New Issue
Block a user