diff options
| author | Jubilee Young <workingjubilee@gmail.com> | 2025-03-04 16:48:13 -0800 |
|---|---|---|
| committer | Jubilee Young <workingjubilee@gmail.com> | 2025-03-04 18:23:51 -0800 |
| commit | e81fbe30e6bfbfb62f599b03baf0f34bab447bef (patch) | |
| tree | f18df44cf782c4382f45cb9ef26cc2fc4a2b706c /compiler/rustc_monomorphize/src/mono_checks | |
| parent | 5abf36b486a426c20c71dccc9252aab6c724a0cd (diff) | |
| download | rust-e81fbe30e6bfbfb62f599b03baf0f34bab447bef.tar.gz rust-e81fbe30e6bfbfb62f599b03baf0f34bab447bef.zip | |
compiler: use `is_rustic_abi` in abi_check
warns on fewer ABIs now
Diffstat (limited to 'compiler/rustc_monomorphize/src/mono_checks')
| -rw-r--r-- | compiler/rustc_monomorphize/src/mono_checks/abi_check.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_monomorphize/src/mono_checks/abi_check.rs b/compiler/rustc_monomorphize/src/mono_checks/abi_check.rs index 9f26da7d5c6..06d6c3ab805 100644 --- a/compiler/rustc_monomorphize/src/mono_checks/abi_check.rs +++ b/compiler/rustc_monomorphize/src/mono_checks/abi_check.rs @@ -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(); |
