@@ -9,7 +9,7 @@ pub fn anonymize_predicate<'tcx>(
9
9
tcx : TyCtxt < ' tcx > ,
10
10
pred : ty:: Predicate < ' tcx > ,
11
11
) -> ty:: Predicate < ' tcx > {
12
- let new = tcx. anonymize_late_bound_regions ( pred. bound_atom ( ) ) ;
12
+ let new = tcx. anonymize_late_bound_regions ( pred. kind ( ) ) ;
13
13
tcx. reuse_or_mk_predicate ( pred, new)
14
14
}
15
15
@@ -121,9 +121,9 @@ impl Elaborator<'tcx> {
121
121
fn elaborate ( & mut self , obligation : & PredicateObligation < ' tcx > ) {
122
122
let tcx = self . visited . tcx ;
123
123
124
- let bound_predicate = obligation. predicate . bound_atom ( ) ;
124
+ let bound_predicate = obligation. predicate . kind ( ) ;
125
125
match bound_predicate. skip_binder ( ) {
126
- ty:: PredicateAtom :: Trait ( data, _) => {
126
+ ty:: PredicateKind :: Trait ( data, _) => {
127
127
// Get predicates declared on the trait.
128
128
let predicates = tcx. super_predicates_of ( data. def_id ( ) ) ;
129
129
@@ -145,36 +145,36 @@ impl Elaborator<'tcx> {
145
145
146
146
self . stack . extend ( obligations) ;
147
147
}
148
- ty:: PredicateAtom :: WellFormed ( ..) => {
148
+ ty:: PredicateKind :: WellFormed ( ..) => {
149
149
// Currently, we do not elaborate WF predicates,
150
150
// although we easily could.
151
151
}
152
- ty:: PredicateAtom :: ObjectSafe ( ..) => {
152
+ ty:: PredicateKind :: ObjectSafe ( ..) => {
153
153
// Currently, we do not elaborate object-safe
154
154
// predicates.
155
155
}
156
- ty:: PredicateAtom :: Subtype ( ..) => {
156
+ ty:: PredicateKind :: Subtype ( ..) => {
157
157
// Currently, we do not "elaborate" predicates like `X <: Y`,
158
158
// though conceivably we might.
159
159
}
160
- ty:: PredicateAtom :: Projection ( ..) => {
160
+ ty:: PredicateKind :: Projection ( ..) => {
161
161
// Nothing to elaborate in a projection predicate.
162
162
}
163
- ty:: PredicateAtom :: ClosureKind ( ..) => {
163
+ ty:: PredicateKind :: ClosureKind ( ..) => {
164
164
// Nothing to elaborate when waiting for a closure's kind to be inferred.
165
165
}
166
- ty:: PredicateAtom :: ConstEvaluatable ( ..) => {
166
+ ty:: PredicateKind :: ConstEvaluatable ( ..) => {
167
167
// Currently, we do not elaborate const-evaluatable
168
168
// predicates.
169
169
}
170
- ty:: PredicateAtom :: ConstEquate ( ..) => {
170
+ ty:: PredicateKind :: ConstEquate ( ..) => {
171
171
// Currently, we do not elaborate const-equate
172
172
// predicates.
173
173
}
174
- ty:: PredicateAtom :: RegionOutlives ( ..) => {
174
+ ty:: PredicateKind :: RegionOutlives ( ..) => {
175
175
// Nothing to elaborate from `'a: 'b`.
176
176
}
177
- ty:: PredicateAtom :: TypeOutlives ( ty:: OutlivesPredicate ( ty_max, r_min) ) => {
177
+ ty:: PredicateKind :: TypeOutlives ( ty:: OutlivesPredicate ( ty_max, r_min) ) => {
178
178
// We know that `T: 'a` for some type `T`. We can
179
179
// often elaborate this. For example, if we know that
180
180
// `[U]: 'a`, that implies that `U: 'a`. Similarly, if
@@ -204,15 +204,15 @@ impl Elaborator<'tcx> {
204
204
if r. is_late_bound ( ) {
205
205
None
206
206
} else {
207
- Some ( ty:: PredicateAtom :: RegionOutlives ( ty:: OutlivesPredicate (
207
+ Some ( ty:: PredicateKind :: RegionOutlives ( ty:: OutlivesPredicate (
208
208
r, r_min,
209
209
) ) )
210
210
}
211
211
}
212
212
213
213
Component :: Param ( p) => {
214
214
let ty = tcx. mk_ty_param ( p. index , p. name ) ;
215
- Some ( ty:: PredicateAtom :: TypeOutlives ( ty:: OutlivesPredicate (
215
+ Some ( ty:: PredicateKind :: TypeOutlives ( ty:: OutlivesPredicate (
216
216
ty, r_min,
217
217
) ) )
218
218
}
@@ -237,7 +237,7 @@ impl Elaborator<'tcx> {
237
237
} ) ,
238
238
) ;
239
239
}
240
- ty:: PredicateAtom :: TypeWellFormedFromEnv ( ..) => {
240
+ ty:: PredicateKind :: TypeWellFormedFromEnv ( ..) => {
241
241
// Nothing to elaborate
242
242
}
243
243
}
0 commit comments