compiler: use is_rustic_abi in abi_check

warns on fewer ABIs now
This commit is contained in:
Jubilee Young 2025-03-04 16:48:13 -08:00
parent 5abf36b486
commit e81fbe30e6

View file

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