mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-30 18:53:39 +00:00
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 @@ impl<'tcx> LateLintPass<'tcx> for BoxedLocal {
|
||||
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 @@ mod issue_3739 {
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
/// 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