@@ -4,13 +4,12 @@ use std::assert_matches::assert_matches;
4
4
use std:: borrow:: Cow ;
5
5
6
6
use either:: { Left , Right } ;
7
+ use rustc_abi:: { self as abi, ExternAbi , FieldIdx , Integer } ;
7
8
use rustc_middle:: ty:: layout:: { FnAbiOf , IntegerExt , LayoutOf , TyAndLayout } ;
8
9
use rustc_middle:: ty:: { self , AdtDef , Instance , Ty } ;
9
10
use rustc_middle:: { bug, mir, span_bug} ;
10
11
use rustc_span:: sym;
11
- use rustc_target:: abi:: call:: { ArgAbi , FnAbi , PassMode } ;
12
- use rustc_target:: abi:: { self , FieldIdx , Integer } ;
13
- use rustc_target:: spec:: abi:: Abi ;
12
+ use rustc_target:: callconv:: { ArgAbi , FnAbi , PassMode } ;
14
13
use tracing:: { info, instrument, trace} ;
15
14
16
15
use super :: {
@@ -488,7 +487,7 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> {
488
487
pub ( super ) fn init_fn_call (
489
488
& mut self ,
490
489
fn_val : FnVal < ' tcx , M :: ExtraFnVal > ,
491
- ( caller_abi, caller_fn_abi) : ( Abi , & FnAbi < ' tcx , Ty < ' tcx > > ) ,
490
+ ( caller_abi, caller_fn_abi) : ( ExternAbi , & FnAbi < ' tcx , Ty < ' tcx > > ) ,
492
491
args : & [ FnArg < ' tcx , M :: Provenance > ] ,
493
492
with_caller_location : bool ,
494
493
destination : & MPlaceTy < ' tcx , M :: Provenance > ,
@@ -566,7 +565,7 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> {
566
565
567
566
// Special handling for the closure ABI: untuple the last argument.
568
567
let args: Cow < ' _ , [ FnArg < ' tcx , M :: Provenance > ] > =
569
- if caller_abi == Abi :: RustCall && !args. is_empty ( ) {
568
+ if caller_abi == ExternAbi :: RustCall && !args. is_empty ( ) {
570
569
// Untuple
571
570
let ( untuple_arg, args) = args. split_last ( ) . unwrap ( ) ;
572
571
trace ! ( "init_fn_call: Will pass last argument by untupling" ) ;
@@ -732,7 +731,7 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> {
732
731
pub ( super ) fn init_fn_tail_call (
733
732
& mut self ,
734
733
fn_val : FnVal < ' tcx , M :: ExtraFnVal > ,
735
- ( caller_abi, caller_fn_abi) : ( Abi , & FnAbi < ' tcx , Ty < ' tcx > > ) ,
734
+ ( caller_abi, caller_fn_abi) : ( ExternAbi , & FnAbi < ' tcx , Ty < ' tcx > > ) ,
736
735
args : & [ FnArg < ' tcx , M :: Provenance > ] ,
737
736
with_caller_location : bool ,
738
737
) -> InterpResult < ' tcx > {
@@ -817,7 +816,7 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> {
817
816
818
817
self . init_fn_call (
819
818
FnVal :: Instance ( instance) ,
820
- ( Abi :: Rust , fn_abi) ,
819
+ ( ExternAbi :: Rust , fn_abi) ,
821
820
& [ FnArg :: Copy ( arg. into ( ) ) ] ,
822
821
false ,
823
822
& ret,
0 commit comments