Skip to content

Commit e81fbe3

Browse files
compiler: use is_rustic_abi in abi_check
warns on fewer ABIs now
1 parent 5abf36b commit e81fbe3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

compiler/rustc_monomorphize/src/mono_checks/abi_check.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//! This module ensures that if a function's ABI requires a particular target feature,
22
//! that target feature is enabled both on the callee and all callers.
3-
use rustc_abi::{BackendRepr, ExternAbi, RegKind};
3+
use rustc_abi::{BackendRepr, RegKind};
44
use rustc_hir::CRATE_HIR_ID;
55
use rustc_middle::mir::{self, traversal};
66
use rustc_middle::ty::{self, Instance, InstanceKind, Ty, TyCtxt};
@@ -115,8 +115,8 @@ fn check_call_site_abi<'tcx>(
115115
span: Span,
116116
caller: InstanceKind<'tcx>,
117117
) {
118-
if callee.fn_sig(tcx).abi() == ExternAbi::Rust {
119-
// "Rust" ABI never passes arguments in vector registers.
118+
if callee.fn_sig(tcx).abi().is_rustic_abi() {
119+
// we directly handle the soundness of Rust ABIs
120120
return;
121121
}
122122
let typing_env = ty::TypingEnv::fully_monomorphized();

0 commit comments

Comments
 (0)