@@ -5,26 +5,27 @@ use rustc_middle::ty::{ParamEnvAnd, TyCtxt};
5
5
use rustc_trait_selection:: infer:: InferCtxtBuilderExt ;
6
6
use rustc_trait_selection:: traits:: error_reporting:: TypeErrCtxtExt ;
7
7
use rustc_trait_selection:: traits:: query:: {
8
- normalize:: NormalizationResult , CanonicalProjectionGoal , NoSolution ,
8
+ normalize:: NormalizationResult , CanonicalAliasGoal , NoSolution ,
9
9
} ;
10
10
use rustc_trait_selection:: traits:: {
11
11
self , FulfillmentErrorCode , ObligationCause , SelectionContext ,
12
12
} ;
13
13
14
14
pub ( crate ) fn provide ( p : & mut Providers ) {
15
15
* 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 ,
19
19
..* p
20
20
} ;
21
21
}
22
22
23
- fn normalize_projection_ty < ' tcx > (
23
+ fn normalize_canonicalized_projection_ty < ' tcx > (
24
24
tcx : TyCtxt < ' tcx > ,
25
- goal : CanonicalProjectionGoal < ' tcx > ,
25
+ goal : CanonicalAliasGoal < ' tcx > ,
26
26
) -> Result < & ' tcx Canonical < ' tcx , QueryResponse < ' tcx , NormalizationResult < ' tcx > > > , NoSolution > {
27
- debug ! ( "normalize_provider(goal={:#?})" , goal) ;
27
+ debug ! ( "normalize_canonicalized_projection_ty(goal={:#?})" , goal) ;
28
+
28
29
tcx. infer_ctxt ( ) . enter_canonical_trait_query (
29
30
& goal,
30
31
|ocx, ParamEnvAnd { param_env, value : goal } | {
@@ -61,19 +62,19 @@ fn normalize_projection_ty<'tcx>(
61
62
return Err ( NoSolution ) ;
62
63
}
63
64
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?
67
68
Ok ( NormalizationResult { normalized_ty : answer. ty ( ) . unwrap ( ) } )
68
69
} ,
69
70
)
70
71
}
71
72
72
- fn normalize_weak_ty < ' tcx > (
73
+ fn normalize_canonicalized_weak_ty < ' tcx > (
73
74
tcx : TyCtxt < ' tcx > ,
74
- goal : CanonicalProjectionGoal < ' tcx > ,
75
+ goal : CanonicalAliasGoal < ' tcx > ,
75
76
) -> Result < & ' tcx Canonical < ' tcx , QueryResponse < ' tcx , NormalizationResult < ' tcx > > > , NoSolution > {
76
- debug ! ( "normalize_provider (goal={:#?})" , goal) ;
77
+ debug ! ( "normalize_canonicalized_weak_ty (goal={:#?})" , goal) ;
77
78
78
79
tcx. infer_ctxt ( ) . enter_canonical_trait_query (
79
80
& goal,
@@ -95,11 +96,11 @@ fn normalize_weak_ty<'tcx>(
95
96
)
96
97
}
97
98
98
- fn normalize_inherent_projection_ty < ' tcx > (
99
+ fn normalize_canonicalized_inherent_projection_ty < ' tcx > (
99
100
tcx : TyCtxt < ' tcx > ,
100
- goal : CanonicalProjectionGoal < ' tcx > ,
101
+ goal : CanonicalAliasGoal < ' tcx > ,
101
102
) -> Result < & ' tcx Canonical < ' tcx , QueryResponse < ' tcx , NormalizationResult < ' tcx > > > , NoSolution > {
102
- debug ! ( "normalize_provider (goal={:#?})" , goal) ;
103
+ debug ! ( "normalize_canonicalized_inherent_projection_ty (goal={:#?})" , goal) ;
103
104
104
105
tcx. infer_ctxt ( ) . enter_canonical_trait_query (
105
106
& goal,
0 commit comments