@@ -386,10 +386,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
386
386
387
387
let infcx = & self . infcx ;
388
388
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) ;
393
390
debug ! (
394
391
"probe_op: Mode::Path, param_env_and_self_ty={:?} self_ty={:?}" ,
395
392
param_env_and_self_ty, self_ty
@@ -661,13 +658,13 @@ impl<'a, 'tcx> ProbeContext<'a, 'tcx> {
661
658
// of the iterations in the autoderef loop, so there is no problem with it
662
659
// being discoverable in another one of these iterations.
663
660
//
664
- // Using `instantiate_canonical_with_fresh_inference_vars ` on our
661
+ // Using `instantiate_canonical ` on our
665
662
// `Canonical<QueryResponse<Ty<'tcx>>>` and then *throwing away* the
666
663
// `CanonicalVarValues` will exactly give us such a generalization - it
667
664
// will still match the original object type, but it won't pollute our
668
665
// type variables in any form, so just do that!
669
666
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) ;
671
668
672
669
self . assemble_inherent_candidates_from_object ( generalized_self_ty) ;
673
670
self . assemble_inherent_impl_candidates_for_type ( p. def_id ( ) ) ;
0 commit comments