@@ -31,13 +31,13 @@ use rustc_span::lev_distance::{
31
31
use rustc_span:: symbol:: sym;
32
32
use rustc_span:: { symbol:: Ident , Span , Symbol , DUMMY_SP } ;
33
33
use rustc_trait_selection:: autoderef:: { self , Autoderef } ;
34
- use rustc_trait_selection:: infer:: InferCtxtExt as _;
35
34
use rustc_trait_selection:: traits:: query:: evaluate_obligation:: InferCtxtExt ;
36
35
use rustc_trait_selection:: traits:: query:: method_autoderef:: MethodAutoderefBadTy ;
37
36
use rustc_trait_selection:: traits:: query:: method_autoderef:: {
38
37
CandidateStep , MethodAutoderefStepsResult ,
39
38
} ;
40
39
use rustc_trait_selection:: traits:: query:: CanonicalTyGoal ;
40
+ use rustc_trait_selection:: traits:: NormalizeExt ;
41
41
use rustc_trait_selection:: traits:: { self , ObligationCause } ;
42
42
use std:: cmp:: max;
43
43
use std:: iter;
@@ -716,9 +716,8 @@ impl<'a, 'tcx> ProbeContext<'a, 'tcx> {
716
716
// maybe shouldn't include `Param`s, but rather fresh variables or be canonicalized,
717
717
// see issue #89650
718
718
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) ;
722
721
723
722
debug ! (
724
723
"assemble_inherent_impl_probe after normalization: xform_self_ty = {:?}/{:?}" ,
@@ -1507,11 +1506,7 @@ impl<'a, 'tcx> ProbeContext<'a, 'tcx> {
1507
1506
let InferOk {
1508
1507
value : normalized_xform_ret_ty,
1509
1508
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 ) ;
1515
1510
xform_ret_ty = normalized_xform_ret_ty;
1516
1511
debug ! ( "xform_ret_ty after normalization: {:?}" , xform_ret_ty) ;
1517
1512
@@ -1521,11 +1516,7 @@ impl<'a, 'tcx> ProbeContext<'a, 'tcx> {
1521
1516
let impl_bounds = impl_bounds. instantiate ( self . tcx , substs) ;
1522
1517
1523
1518
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) ;
1529
1520
1530
1521
// Convert the bounds into obligations.
1531
1522
let impl_obligations = traits:: predicates_for_generics (
0 commit comments