@@ -262,7 +262,7 @@ impl<'a, 'tcx> ConfirmContext<'a, 'tcx> {
262262 let original_poly_trait_ref = principal. with_self_ty ( this. tcx , object_ty) ;
263263 let upcast_poly_trait_ref = this. upcast ( original_poly_trait_ref, trait_def_id) ;
264264 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) ;
266266 debug ! (
267267 "original_poly_trait_ref={:?} upcast_trait_ref={:?} target_trait={:?}" ,
268268 original_poly_trait_ref, upcast_trait_ref, trait_def_id
@@ -285,7 +285,7 @@ impl<'a, 'tcx> ConfirmContext<'a, 'tcx> {
285285 probe:: WhereClausePick ( poly_trait_ref) => {
286286 // Where clauses can have bound regions in them. We need to instantiate
287287 // 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
289289 }
290290 }
291291 }
@@ -506,7 +506,7 @@ impl<'a, 'tcx> ConfirmContext<'a, 'tcx> {
506506 let sig = self . tcx . fn_sig ( def_id) . subst ( self . tcx , all_substs) ;
507507 debug ! ( "type scheme substituted, sig={:?}" , sig) ;
508508
509- let sig = self . replace_bound_vars_with_fresh_vars ( sig) ;
509+ let sig = self . instantiate_binder_with_fresh_vars ( sig) ;
510510 debug ! ( "late-bound lifetimes from method instantiated, sig={:?}" , sig) ;
511511
512512 ( sig, method_predicates)
@@ -625,10 +625,10 @@ impl<'a, 'tcx> ConfirmContext<'a, 'tcx> {
625625 upcast_trait_refs. into_iter ( ) . next ( ) . unwrap ( )
626626 }
627627
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
629629 where
630630 T : TypeFoldable < ' tcx > + Copy ,
631631 {
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)
633633 }
634634}
0 commit comments