compiler: Directly use rustc_abi in mir_transform

This commit is contained in:
Jubilee Young
2024-11-02 19:33:00 -07:00
parent 236fe33345
commit 843b6e0859
19 changed files with 45 additions and 44 deletions

View File

@@ -1,6 +1,7 @@
use std::assert_matches::assert_matches;
use std::{fmt, iter};
use rustc_abi::{ExternAbi, FIRST_VARIANT, FieldIdx, VariantIdx};
use rustc_hir as hir;
use rustc_hir::def_id::DefId;
use rustc_hir::lang_items::LangItem;
@@ -15,8 +16,6 @@ use rustc_middle::{bug, span_bug};
use rustc_mir_dataflow::elaborate_drops::{self, DropElaborator, DropFlagMode, DropStyle};
use rustc_span::source_map::Spanned;
use rustc_span::{DUMMY_SP, Span};
use rustc_target::abi::{FIRST_VARIANT, FieldIdx, VariantIdx};
use rustc_target::spec::abi::Abi;
use tracing::{debug, instrument};
use crate::{
@@ -905,7 +904,7 @@ fn build_call_shim<'tcx>(
let mut body =
new_body(MirSource::from_instance(instance), blocks, local_decls, sig.inputs().len(), span);
if let Abi::RustCall = sig.abi {
if let ExternAbi::RustCall = sig.abi {
body.spread_arg = Some(Local::new(sig.inputs().len()));
}