@@ -336,8 +336,7 @@ impl<'tcx> CloneShimBuilder<'tcx> {
336
336
// we must subst the self_ty because it's
337
337
// otherwise going to be TySelf and we can't index
338
338
// or access fields of a Place of type TySelf.
339
- let substs = tcx. mk_substs_trait ( self_ty, [ ] ) ;
340
- let sig = tcx. bound_fn_sig ( def_id) . subst ( tcx, substs) ;
339
+ let sig = tcx. bound_fn_sig ( def_id) . subst ( tcx, & [ self_ty. into ( ) ] ) ;
341
340
let sig = tcx. erase_late_bound_regions ( sig) ;
342
341
let span = tcx. def_span ( def_id) ;
343
342
@@ -573,9 +572,8 @@ fn build_call_shim<'tcx>(
573
572
574
573
// Create substitutions for the `Self` and `Args` generic parameters of the shim body.
575
574
let arg_tup = tcx. mk_tup ( untuple_args. iter ( ) ) ;
576
- let sig_substs = tcx. mk_substs_trait ( ty, [ ty:: subst:: GenericArg :: from ( arg_tup) ] ) ;
577
575
578
- ( Some ( sig_substs ) , Some ( untuple_args) )
576
+ ( Some ( [ ty . into ( ) , arg_tup . into ( ) ] ) , Some ( untuple_args) )
579
577
} else {
580
578
( None , None )
581
579
} ;
@@ -586,7 +584,7 @@ fn build_call_shim<'tcx>(
586
584
587
585
assert_eq ! ( sig_substs. is_some( ) , !instance. has_polymorphic_mir_body( ) ) ;
588
586
let mut sig =
589
- if let Some ( sig_substs) = sig_substs { sig. subst ( tcx, sig_substs) } else { sig. 0 } ;
587
+ if let Some ( sig_substs) = sig_substs { sig. subst ( tcx, & sig_substs) } else { sig. 0 } ;
590
588
591
589
if let CallKind :: Indirect ( fnty) = call_kind {
592
590
// `sig` determines our local decls, and thus the callee type in the `Call` terminator. This
0 commit comments