@@ -386,10 +386,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
386386
387387 let infcx = & self . infcx ;
388388 let ( ParamEnvAnd { param_env : _, value : self_ty } , canonical_inference_vars) =
389- infcx. instantiate_canonical_with_fresh_inference_vars (
390- span,
391- & param_env_and_self_ty,
392- ) ;
389+ infcx. instantiate_canonical ( span, & param_env_and_self_ty) ;
393390 debug ! (
394391 "probe_op: Mode::Path, param_env_and_self_ty={:?} self_ty={:?}" ,
395392 param_env_and_self_ty, self_ty
@@ -661,13 +658,13 @@ impl<'a, 'tcx> ProbeContext<'a, 'tcx> {
661658 // of the iterations in the autoderef loop, so there is no problem with it
662659 // being discoverable in another one of these iterations.
663660 //
664- // Using `instantiate_canonical_with_fresh_inference_vars ` on our
661+ // Using `instantiate_canonical ` on our
665662 // `Canonical<QueryResponse<Ty<'tcx>>>` and then *throwing away* the
666663 // `CanonicalVarValues` will exactly give us such a generalization - it
667664 // will still match the original object type, but it won't pollute our
668665 // type variables in any form, so just do that!
669666 let ( QueryResponse { value : generalized_self_ty, .. } , _ignored_var_values) =
670- self . fcx . instantiate_canonical_with_fresh_inference_vars ( self . span , self_ty) ;
667+ self . fcx . instantiate_canonical ( self . span , self_ty) ;
671668
672669 self . assemble_inherent_candidates_from_object ( generalized_self_ty) ;
673670 self . assemble_inherent_impl_candidates_for_type ( p. def_id ( ) ) ;
0 commit comments