@@ -53,7 +53,11 @@ 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, & RevealAllLayoutCx ( tcx) . fn_abi_of_instance ( inst, & [ ] ) )
56
+ clif_sig_from_fn_abi (
57
+ tcx,
58
+ triple,
59
+ & RevealAllLayoutCx ( tcx) . fn_abi_of_instance ( inst, ty:: List :: empty ( ) ) ,
60
+ )
57
61
}
58
62
59
63
/// Instance must be monomorphized
@@ -350,14 +354,13 @@ pub(crate) fn codegen_terminator_call<'tcx>(
350
354
} ;
351
355
352
356
let extra_args = & args[ fn_sig. inputs ( ) . len ( ) ..] ;
353
- let extra_args = extra_args
354
- . iter ( )
355
- . map ( |op_arg| fx. monomorphize ( op_arg. ty ( fx. mir , fx. tcx ) ) )
356
- . collect :: < Vec < _ > > ( ) ;
357
+ let extra_args = fx
358
+ . tcx
359
+ . mk_type_list ( extra_args. iter ( ) . map ( |op_arg| fx. monomorphize ( op_arg. ty ( fx. mir , fx. tcx ) ) ) ) ;
357
360
let fn_abi = if let Some ( instance) = instance {
358
- RevealAllLayoutCx ( fx. tcx ) . fn_abi_of_instance ( instance, & extra_args)
361
+ RevealAllLayoutCx ( fx. tcx ) . fn_abi_of_instance ( instance, extra_args)
359
362
} else {
360
- RevealAllLayoutCx ( fx. tcx ) . fn_abi_of_fn_ptr ( fn_ty. fn_sig ( fx. tcx ) , & extra_args)
363
+ RevealAllLayoutCx ( fx. tcx ) . fn_abi_of_fn_ptr ( fn_ty. fn_sig ( fx. tcx ) , extra_args)
361
364
} ;
362
365
363
366
let is_cold = instance
@@ -525,7 +528,8 @@ pub(crate) fn codegen_drop<'tcx>(
525
528
def : ty:: InstanceDef :: Virtual ( drop_instance. def_id ( ) , 0 ) ,
526
529
substs : drop_instance. substs ,
527
530
} ;
528
- let fn_abi = RevealAllLayoutCx ( fx. tcx ) . fn_abi_of_instance ( virtual_drop, & [ ] ) ;
531
+ let fn_abi =
532
+ RevealAllLayoutCx ( fx. tcx ) . fn_abi_of_instance ( virtual_drop, ty:: List :: empty ( ) ) ;
529
533
530
534
let sig = clif_sig_from_fn_abi ( fx. tcx , fx. triple ( ) , & fn_abi) ;
531
535
let sig = fx. bcx . import_signature ( sig) ;
@@ -534,7 +538,8 @@ pub(crate) fn codegen_drop<'tcx>(
534
538
_ => {
535
539
assert ! ( !matches!( drop_instance. def, InstanceDef :: Virtual ( _, _) ) ) ;
536
540
537
- let fn_abi = RevealAllLayoutCx ( fx. tcx ) . fn_abi_of_instance ( drop_instance, & [ ] ) ;
541
+ let fn_abi =
542
+ RevealAllLayoutCx ( fx. tcx ) . fn_abi_of_instance ( drop_instance, ty:: List :: empty ( ) ) ;
538
543
539
544
let arg_value = drop_place. place_ref (
540
545
fx,
0 commit comments