@@ -5,26 +5,27 @@ use rustc_middle::ty::{ParamEnvAnd, TyCtxt};
55use rustc_trait_selection:: infer:: InferCtxtBuilderExt ;
66use rustc_trait_selection:: traits:: error_reporting:: TypeErrCtxtExt ;
77use rustc_trait_selection:: traits:: query:: {
8- normalize:: NormalizationResult , CanonicalProjectionGoal , NoSolution ,
8+ normalize:: NormalizationResult , CanonicalAliasGoal , NoSolution ,
99} ;
1010use rustc_trait_selection:: traits:: {
1111 self , FulfillmentErrorCode , ObligationCause , SelectionContext ,
1212} ;
1313
1414pub ( crate ) fn provide ( p : & mut Providers ) {
1515 * p = Providers {
16- normalize_projection_ty ,
17- normalize_weak_ty ,
18- normalize_inherent_projection_ty ,
16+ normalize_canonicalized_projection_ty ,
17+ normalize_canonicalized_weak_ty ,
18+ normalize_canonicalized_inherent_projection_ty ,
1919 ..* p
2020 } ;
2121}
2222
23- fn normalize_projection_ty < ' tcx > (
23+ fn normalize_canonicalized_projection_ty < ' tcx > (
2424 tcx : TyCtxt < ' tcx > ,
25- goal : CanonicalProjectionGoal < ' tcx > ,
25+ goal : CanonicalAliasGoal < ' tcx > ,
2626) -> Result < & ' tcx Canonical < ' tcx , QueryResponse < ' tcx , NormalizationResult < ' tcx > > > , NoSolution > {
27- debug ! ( "normalize_provider(goal={:#?})" , goal) ;
27+ debug ! ( "normalize_canonicalized_projection_ty(goal={:#?})" , goal) ;
28+
2829 tcx. infer_ctxt ( ) . enter_canonical_trait_query (
2930 & goal,
3031 |ocx, ParamEnvAnd { param_env, value : goal } | {
@@ -61,19 +62,19 @@ fn normalize_projection_ty<'tcx>(
6162 return Err ( NoSolution ) ;
6263 }
6364
64- // FIXME(associated_const_equality): All users of normalize_projection_ty expected
65- // a type, but there is the possibility it could've been a const now. Maybe change
66- // it to a Term later?
65+ // FIXME(associated_const_equality): All users of normalize_canonicalized_projection_ty
66+ // expected a type, but there is the possibility it could've been a const now.
67+ // Maybe change it to a Term later?
6768 Ok ( NormalizationResult { normalized_ty : answer. ty ( ) . unwrap ( ) } )
6869 } ,
6970 )
7071}
7172
72- fn normalize_weak_ty < ' tcx > (
73+ fn normalize_canonicalized_weak_ty < ' tcx > (
7374 tcx : TyCtxt < ' tcx > ,
74- goal : CanonicalProjectionGoal < ' tcx > ,
75+ goal : CanonicalAliasGoal < ' tcx > ,
7576) -> Result < & ' tcx Canonical < ' tcx , QueryResponse < ' tcx , NormalizationResult < ' tcx > > > , NoSolution > {
76- debug ! ( "normalize_provider (goal={:#?})" , goal) ;
77+ debug ! ( "normalize_canonicalized_weak_ty (goal={:#?})" , goal) ;
7778
7879 tcx. infer_ctxt ( ) . enter_canonical_trait_query (
7980 & goal,
@@ -95,11 +96,11 @@ fn normalize_weak_ty<'tcx>(
9596 )
9697}
9798
98- fn normalize_inherent_projection_ty < ' tcx > (
99+ fn normalize_canonicalized_inherent_projection_ty < ' tcx > (
99100 tcx : TyCtxt < ' tcx > ,
100- goal : CanonicalProjectionGoal < ' tcx > ,
101+ goal : CanonicalAliasGoal < ' tcx > ,
101102) -> Result < & ' tcx Canonical < ' tcx , QueryResponse < ' tcx , NormalizationResult < ' tcx > > > , NoSolution > {
102- debug ! ( "normalize_provider (goal={:#?})" , goal) ;
103+ debug ! ( "normalize_canonicalized_inherent_projection_ty (goal={:#?})" , goal) ;
103104
104105 tcx. infer_ctxt ( ) . enter_canonical_trait_query (
105106 & goal,
0 commit comments