diff options
| author | Jubilee Young <workingjubilee@gmail.com> | 2024-11-02 19:33:00 -0700 |
|---|---|---|
| committer | Jubilee Young <workingjubilee@gmail.com> | 2024-11-03 13:38:47 -0800 |
| commit | 843b6e08592affd76a15c6e0e9ceaf73b98d7d5a (patch) | |
| tree | 9995f3fb04d6a6cefd389b8f8e4d334d8cadef65 /compiler/rustc_mir_transform/src/validate.rs | |
| parent | 236fe33345072e6363560fd2b535a10947af86f7 (diff) | |
| download | rust-843b6e08592affd76a15c6e0e9ceaf73b98d7d5a.tar.gz rust-843b6e08592affd76a15c6e0e9ceaf73b98d7d5a.zip | |
compiler: Directly use rustc_abi in mir_transform
Diffstat (limited to 'compiler/rustc_mir_transform/src/validate.rs')
| -rw-r--r-- | compiler/rustc_mir_transform/src/validate.rs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/compiler/rustc_mir_transform/src/validate.rs b/compiler/rustc_mir_transform/src/validate.rs index 8109a9b8ba0..ae4e6ea6a74 100644 --- a/compiler/rustc_mir_transform/src/validate.rs +++ b/compiler/rustc_mir_transform/src/validate.rs @@ -1,5 +1,6 @@ //! Validates the MIR to ensure that invariants are upheld. +use rustc_abi::{ExternAbi, FIRST_VARIANT, Size}; use rustc_data_structures::fx::{FxHashMap, FxHashSet}; use rustc_hir::LangItem; use rustc_index::IndexVec; @@ -15,8 +16,6 @@ use rustc_middle::ty::{ Variance, }; use rustc_middle::{bug, span_bug}; -use rustc_target::abi::{FIRST_VARIANT, Size}; -use rustc_target::spec::abi::Abi; use rustc_trait_selection::traits::ObligationCtxt; use rustc_type_ir::Upcast; @@ -60,9 +59,9 @@ impl<'tcx> crate::MirPass<'tcx> for Validator { let body_ty = tcx.type_of(def_id).skip_binder(); let body_abi = match body_ty.kind() { ty::FnDef(..) => body_ty.fn_sig(tcx).abi(), - ty::Closure(..) => Abi::RustCall, - ty::CoroutineClosure(..) => Abi::RustCall, - ty::Coroutine(..) => Abi::Rust, + ty::Closure(..) => ExternAbi::RustCall, + ty::CoroutineClosure(..) => ExternAbi::RustCall, + ty::Coroutine(..) => ExternAbi::Rust, // No need to do MIR validation on error bodies ty::Error(_) => return, _ => { |
