1
Fork 0

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
commit e81fbe30e6

View file

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