about summary refs log tree commit diff
path: root/compiler
diff options
context:
space:
mode:
authorJubilee Young <workingjubilee@gmail.com>2024-09-21 08:48:28 -0700
committerJubilee Young <workingjubilee@gmail.com>2024-09-21 08:59:52 -0700
commit93993c77f55047cc1774fdfee4bcca9d43592c2a (patch)
tree7db1b8df2f7eea04f4325249cae9ab24fd5a3690 /compiler
parentf48c99a0041bb82a750b34cf2570e0e73d6d801c (diff)
downloadrust-93993c77f55047cc1774fdfee4bcca9d43592c2a.tar.gz
rust-93993c77f55047cc1774fdfee4bcca9d43592c2a.zip
compiler: Accept "improper" ctypes in extern "rust-cold" fn
Diffstat (limited to 'compiler')
-rw-r--r--compiler/rustc_lint/src/types.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/compiler/rustc_lint/src/types.rs b/compiler/rustc_lint/src/types.rs
index f9d0cd49708..3d042f21745 100644
--- a/compiler/rustc_lint/src/types.rs
+++ b/compiler/rustc_lint/src/types.rs
@@ -1320,7 +1320,10 @@ impl<'a, 'tcx> ImproperCTypesVisitor<'a, 'tcx> {
     }
 
     fn is_internal_abi(&self, abi: SpecAbi) -> bool {
-        matches!(abi, SpecAbi::Rust | SpecAbi::RustCall | SpecAbi::RustIntrinsic)
+        matches!(
+            abi,
+            SpecAbi::Rust | SpecAbi::RustCall | SpecAbi::RustCold | SpecAbi::RustIntrinsic
+        )
     }
 
     /// Find any fn-ptr types with external ABIs in `ty`.