1
Fork 0

compiler: Accept "improper" ctypes in extern "rust-cold" fn

This commit is contained in:
Jubilee Young 2024-09-21 08:48:28 -07:00
parent f48c99a004
commit 93993c77f5
2 changed files with 18 additions and 1 deletions

View file

@ -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`.