@@ -337,7 +337,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
337
337
def : ty:: InstanceDef :: Virtual ( drop_fn. def_id ( ) , 0 ) ,
338
338
substs : drop_fn. substs ,
339
339
} ;
340
- let fn_abi = bx. fn_abi_of_instance ( virtual_drop, & [ ] ) ;
340
+ let fn_abi = bx. fn_abi_of_instance ( virtual_drop, ty :: List :: empty ( ) ) ;
341
341
let vtable = args[ 1 ] ;
342
342
args = & args[ ..1 ] ;
343
343
(
@@ -346,7 +346,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
346
346
fn_abi,
347
347
)
348
348
}
349
- _ => ( bx. get_fn_addr ( drop_fn) , bx. fn_abi_of_instance ( drop_fn, & [ ] ) ) ,
349
+ _ => ( bx. get_fn_addr ( drop_fn) , bx. fn_abi_of_instance ( drop_fn, ty :: List :: empty ( ) ) ) ,
350
350
} ;
351
351
helper. do_call (
352
352
self ,
@@ -433,7 +433,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
433
433
// Obtain the panic entry point.
434
434
let def_id = common:: langcall ( bx. tcx ( ) , Some ( span) , "" , lang_item) ;
435
435
let instance = ty:: Instance :: mono ( bx. tcx ( ) , def_id) ;
436
- let fn_abi = bx. fn_abi_of_instance ( instance, & [ ] ) ;
436
+ let fn_abi = bx. fn_abi_of_instance ( instance, ty :: List :: empty ( ) ) ;
437
437
let llfn = bx. get_fn_addr ( instance) ;
438
438
439
439
// Codegen the actual panic invoke/call.
@@ -494,7 +494,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
494
494
let def_id =
495
495
common:: langcall ( bx. tcx ( ) , Some ( source_info. span ) , "" , LangItem :: Panic ) ;
496
496
let instance = ty:: Instance :: mono ( bx. tcx ( ) , def_id) ;
497
- let fn_abi = bx. fn_abi_of_instance ( instance, & [ ] ) ;
497
+ let fn_abi = bx. fn_abi_of_instance ( instance, ty :: List :: empty ( ) ) ;
498
498
let llfn = bx. get_fn_addr ( instance) ;
499
499
500
500
// Codegen the actual panic invoke/call.
@@ -570,17 +570,14 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
570
570
} ;
571
571
572
572
let extra_args = & args[ sig. inputs ( ) . skip_binder ( ) . len ( ) ..] ;
573
- let extra_args = extra_args
574
- . iter ( )
575
- . map ( |op_arg| {
576
- let op_ty = op_arg. ty ( self . mir , bx. tcx ( ) ) ;
577
- self . monomorphize ( op_ty)
578
- } )
579
- . collect :: < Vec < _ > > ( ) ;
573
+ let extra_args = bx. tcx ( ) . mk_type_list ( extra_args. iter ( ) . map ( |op_arg| {
574
+ let op_ty = op_arg. ty ( self . mir , bx. tcx ( ) ) ;
575
+ self . monomorphize ( op_ty)
576
+ } ) ) ;
580
577
581
578
let fn_abi = match instance {
582
- Some ( instance) => bx. fn_abi_of_instance ( instance, & extra_args) ,
583
- None => bx. fn_abi_of_fn_ptr ( sig, & extra_args) ,
579
+ Some ( instance) => bx. fn_abi_of_instance ( instance, extra_args) ,
580
+ None => bx. fn_abi_of_fn_ptr ( sig, extra_args) ,
584
581
} ;
585
582
586
583
if intrinsic == Some ( sym:: transmute) {
0 commit comments