@@ -31,13 +31,13 @@ use rustc_span::lev_distance::{
3131use rustc_span:: symbol:: sym;
3232use rustc_span:: { symbol:: Ident , Span , Symbol , DUMMY_SP } ;
3333use rustc_trait_selection:: autoderef:: { self , Autoderef } ;
34- use rustc_trait_selection:: infer:: InferCtxtExt as _;
3534use rustc_trait_selection:: traits:: query:: evaluate_obligation:: InferCtxtExt ;
3635use rustc_trait_selection:: traits:: query:: method_autoderef:: MethodAutoderefBadTy ;
3736use rustc_trait_selection:: traits:: query:: method_autoderef:: {
3837 CandidateStep , MethodAutoderefStepsResult ,
3938} ;
4039use rustc_trait_selection:: traits:: query:: CanonicalTyGoal ;
40+ use rustc_trait_selection:: traits:: NormalizeExt ;
4141use rustc_trait_selection:: traits:: { self , ObligationCause } ;
4242use std:: cmp:: max;
4343use std:: iter;
@@ -716,9 +716,8 @@ impl<'a, 'tcx> ProbeContext<'a, 'tcx> {
716716 // maybe shouldn't include `Param`s, but rather fresh variables or be canonicalized,
717717 // see issue #89650
718718 let cause = traits:: ObligationCause :: misc ( self . span , self . body_id ) ;
719- let InferOk { value : xform_self_ty, obligations } = self
720- . fcx
721- . partially_normalize_associated_types_in ( cause, self . param_env , xform_self_ty) ;
719+ let InferOk { value : xform_self_ty, obligations } =
720+ self . fcx . at ( & cause, self . param_env ) . normalize ( xform_self_ty) ;
722721
723722 debug ! (
724723 "assemble_inherent_impl_probe after normalization: xform_self_ty = {:?}/{:?}" ,
@@ -1507,11 +1506,7 @@ impl<'a, 'tcx> ProbeContext<'a, 'tcx> {
15071506 let InferOk {
15081507 value : normalized_xform_ret_ty,
15091508 obligations : normalization_obligations,
1510- } = self . fcx . partially_normalize_associated_types_in (
1511- cause. clone ( ) ,
1512- self . param_env ,
1513- probe. xform_ret_ty ,
1514- ) ;
1509+ } = self . fcx . at ( & cause, self . param_env ) . normalize ( probe. xform_ret_ty ) ;
15151510 xform_ret_ty = normalized_xform_ret_ty;
15161511 debug ! ( "xform_ret_ty after normalization: {:?}" , xform_ret_ty) ;
15171512
@@ -1521,11 +1516,7 @@ impl<'a, 'tcx> ProbeContext<'a, 'tcx> {
15211516 let impl_bounds = impl_bounds. instantiate ( self . tcx , substs) ;
15221517
15231518 let InferOk { value : impl_bounds, obligations : norm_obligations } =
1524- self . fcx . partially_normalize_associated_types_in (
1525- cause. clone ( ) ,
1526- self . param_env ,
1527- impl_bounds,
1528- ) ;
1519+ self . fcx . at ( & cause, self . param_env ) . normalize ( impl_bounds) ;
15291520
15301521 // Convert the bounds into obligations.
15311522 let impl_obligations = traits:: predicates_for_generics (
0 commit comments