@@ -262,7 +262,7 @@ impl<'a, 'tcx> ConfirmContext<'a, 'tcx> {
262
262
let original_poly_trait_ref = principal. with_self_ty ( this. tcx , object_ty) ;
263
263
let upcast_poly_trait_ref = this. upcast ( original_poly_trait_ref, trait_def_id) ;
264
264
let upcast_trait_ref =
265
- this. replace_bound_vars_with_fresh_vars ( upcast_poly_trait_ref) ;
265
+ this. instantiate_binder_with_fresh_vars ( upcast_poly_trait_ref) ;
266
266
debug ! (
267
267
"original_poly_trait_ref={:?} upcast_trait_ref={:?} target_trait={:?}" ,
268
268
original_poly_trait_ref, upcast_trait_ref, trait_def_id
@@ -285,7 +285,7 @@ impl<'a, 'tcx> ConfirmContext<'a, 'tcx> {
285
285
probe:: WhereClausePick ( poly_trait_ref) => {
286
286
// Where clauses can have bound regions in them. We need to instantiate
287
287
// those to convert from a poly-trait-ref to a trait-ref.
288
- self . replace_bound_vars_with_fresh_vars ( poly_trait_ref) . substs
288
+ self . instantiate_binder_with_fresh_vars ( poly_trait_ref) . substs
289
289
}
290
290
}
291
291
}
@@ -506,7 +506,7 @@ impl<'a, 'tcx> ConfirmContext<'a, 'tcx> {
506
506
let sig = self . tcx . fn_sig ( def_id) . subst ( self . tcx , all_substs) ;
507
507
debug ! ( "type scheme substituted, sig={:?}" , sig) ;
508
508
509
- let sig = self . replace_bound_vars_with_fresh_vars ( sig) ;
509
+ let sig = self . instantiate_binder_with_fresh_vars ( sig) ;
510
510
debug ! ( "late-bound lifetimes from method instantiated, sig={:?}" , sig) ;
511
511
512
512
( sig, method_predicates)
@@ -625,10 +625,10 @@ impl<'a, 'tcx> ConfirmContext<'a, 'tcx> {
625
625
upcast_trait_refs. into_iter ( ) . next ( ) . unwrap ( )
626
626
}
627
627
628
- fn replace_bound_vars_with_fresh_vars < T > ( & self , value : ty:: Binder < ' tcx , T > ) -> T
628
+ fn instantiate_binder_with_fresh_vars < T > ( & self , value : ty:: Binder < ' tcx , T > ) -> T
629
629
where
630
630
T : TypeFoldable < ' tcx > + Copy ,
631
631
{
632
- self . fcx . replace_bound_vars_with_fresh_vars ( self . span , infer:: FnCall , value)
632
+ self . fcx . instantiate_binder_with_fresh_vars ( self . span , infer:: FnCall , value)
633
633
}
634
634
}
0 commit comments