@@ -5,7 +5,7 @@ mod pass_mode;
5
5
mod returning;
6
6
7
7
use rustc_middle:: middle:: codegen_fn_attrs:: CodegenFnAttrFlags ;
8
- use rustc_middle:: ty:: layout:: FnAbiExt ;
8
+ use rustc_middle:: ty:: layout:: FnAbiOf ;
9
9
use rustc_target:: abi:: call:: { Conv , FnAbi } ;
10
10
use rustc_target:: spec:: abi:: Abi ;
11
11
@@ -53,7 +53,7 @@ pub(crate) fn get_function_sig<'tcx>(
53
53
inst : Instance < ' tcx > ,
54
54
) -> Signature {
55
55
assert ! ( !inst. substs. needs_infer( ) ) ;
56
- clif_sig_from_fn_abi ( tcx, triple, & FnAbi :: of_instance ( & RevealAllLayoutCx ( tcx) , inst, & [ ] ) )
56
+ clif_sig_from_fn_abi ( tcx, triple, & RevealAllLayoutCx ( tcx) . fn_abi_of_instance ( inst, & [ ] ) )
57
57
}
58
58
59
59
/// Instance must be monomorphized
@@ -355,9 +355,9 @@ pub(crate) fn codegen_terminator_call<'tcx>(
355
355
. map ( |op_arg| fx. monomorphize ( op_arg. ty ( fx. mir , fx. tcx ) ) )
356
356
. collect :: < Vec < _ > > ( ) ;
357
357
let fn_abi = if let Some ( instance) = instance {
358
- FnAbi :: of_instance ( & RevealAllLayoutCx ( fx. tcx ) , instance, & extra_args)
358
+ RevealAllLayoutCx ( fx. tcx ) . fn_abi_of_instance ( instance, & extra_args)
359
359
} else {
360
- FnAbi :: of_fn_ptr ( & RevealAllLayoutCx ( fx. tcx ) , fn_ty. fn_sig ( fx. tcx ) , & extra_args)
360
+ RevealAllLayoutCx ( fx. tcx ) . fn_abi_of_fn_ptr ( fn_ty. fn_sig ( fx. tcx ) , & extra_args)
361
361
} ;
362
362
363
363
let is_cold = instance
@@ -525,7 +525,7 @@ pub(crate) fn codegen_drop<'tcx>(
525
525
def : ty:: InstanceDef :: Virtual ( drop_instance. def_id ( ) , 0 ) ,
526
526
substs : drop_instance. substs ,
527
527
} ;
528
- let fn_abi = FnAbi :: of_instance ( & RevealAllLayoutCx ( fx. tcx ) , virtual_drop, & [ ] ) ;
528
+ let fn_abi = RevealAllLayoutCx ( fx. tcx ) . fn_abi_of_instance ( virtual_drop, & [ ] ) ;
529
529
530
530
let sig = clif_sig_from_fn_abi ( fx. tcx , fx. triple ( ) , & fn_abi) ;
531
531
let sig = fx. bcx . import_signature ( sig) ;
@@ -534,7 +534,7 @@ pub(crate) fn codegen_drop<'tcx>(
534
534
_ => {
535
535
assert ! ( !matches!( drop_instance. def, InstanceDef :: Virtual ( _, _) ) ) ;
536
536
537
- let fn_abi = FnAbi :: of_instance ( & RevealAllLayoutCx ( fx. tcx ) , drop_instance, & [ ] ) ;
537
+ let fn_abi = RevealAllLayoutCx ( fx. tcx ) . fn_abi_of_instance ( drop_instance, & [ ] ) ;
538
538
539
539
let arg_value = drop_place. place_ref (
540
540
fx,
0 commit comments