@@ -10,34 +10,34 @@ pub fn anonymize_predicate<'tcx>(
1010 tcx : TyCtxt < ' tcx > ,
1111 pred : ty:: Predicate < ' tcx > ,
1212) -> ty:: Predicate < ' tcx > {
13- let kind = pred. kint ( tcx ) ;
13+ let kind = pred. kind ( ) ;
1414 let new = match kind {
15- ty:: PredicateKint :: ForAll ( binder) => {
16- ty:: PredicateKint :: ForAll ( tcx. anonymize_late_bound_regions ( binder) )
15+ ty:: PredicateKind :: ForAll ( binder) => {
16+ ty:: PredicateKind :: ForAll ( tcx. anonymize_late_bound_regions ( binder) )
1717 }
18- & ty:: PredicateKint :: Trait ( data, constness) => ty:: PredicateKint :: Trait ( data, constness) ,
18+ & ty:: PredicateKind :: Trait ( data, constness) => ty:: PredicateKind :: Trait ( data, constness) ,
1919
20- & ty:: PredicateKint :: RegionOutlives ( data) => ty:: PredicateKint :: RegionOutlives ( data) ,
20+ & ty:: PredicateKind :: RegionOutlives ( data) => ty:: PredicateKind :: RegionOutlives ( data) ,
2121
22- & ty:: PredicateKint :: TypeOutlives ( data) => ty:: PredicateKint :: TypeOutlives ( data) ,
22+ & ty:: PredicateKind :: TypeOutlives ( data) => ty:: PredicateKind :: TypeOutlives ( data) ,
2323
24- & ty:: PredicateKint :: Projection ( data) => ty:: PredicateKint :: Projection ( data) ,
24+ & ty:: PredicateKind :: Projection ( data) => ty:: PredicateKind :: Projection ( data) ,
2525
26- & ty:: PredicateKint :: WellFormed ( data) => ty:: PredicateKint :: WellFormed ( data) ,
26+ & ty:: PredicateKind :: WellFormed ( data) => ty:: PredicateKind :: WellFormed ( data) ,
2727
28- & ty:: PredicateKint :: ObjectSafe ( data) => ty:: PredicateKint :: ObjectSafe ( data) ,
28+ & ty:: PredicateKind :: ObjectSafe ( data) => ty:: PredicateKind :: ObjectSafe ( data) ,
2929
30- & ty:: PredicateKint :: ClosureKind ( closure_def_id, closure_substs, kind) => {
31- ty:: PredicateKint :: ClosureKind ( closure_def_id, closure_substs, kind)
30+ & ty:: PredicateKind :: ClosureKind ( closure_def_id, closure_substs, kind) => {
31+ ty:: PredicateKind :: ClosureKind ( closure_def_id, closure_substs, kind)
3232 }
3333
34- & ty:: PredicateKint :: Subtype ( data) => ty:: PredicateKint :: Subtype ( data) ,
34+ & ty:: PredicateKind :: Subtype ( data) => ty:: PredicateKind :: Subtype ( data) ,
3535
36- & ty:: PredicateKint :: ConstEvaluatable ( def_id, substs) => {
37- ty:: PredicateKint :: ConstEvaluatable ( def_id, substs)
36+ & ty:: PredicateKind :: ConstEvaluatable ( def_id, substs) => {
37+ ty:: PredicateKind :: ConstEvaluatable ( def_id, substs)
3838 }
3939
40- & ty:: PredicateKint :: ConstEquate ( c1, c2) => ty:: PredicateKint :: ConstEquate ( c1, c2) ,
40+ & ty:: PredicateKind :: ConstEquate ( c1, c2) => ty:: PredicateKind :: ConstEquate ( c1, c2) ,
4141 } ;
4242
4343 if new != * kind { new. to_predicate ( tcx) } else { pred }
@@ -151,16 +151,16 @@ impl Elaborator<'tcx> {
151151
152152 fn elaborate ( & mut self , obligation : & PredicateObligation < ' tcx > ) {
153153 let tcx = self . visited . tcx ;
154- let pred = match obligation. predicate . kint ( tcx ) {
155- // We have to be careful and rebind this whenever
154+ let pred = match obligation. predicate . kind ( ) {
155+ // We have to be careful and rebind this when
156156 // dealing with a predicate further down.
157- ty:: PredicateKint :: ForAll ( binder) => binder. skip_binder ( ) ,
157+ ty:: PredicateKind :: ForAll ( binder) => binder. skip_binder ( ) . kind ( ) ,
158158 pred => pred,
159159 } ;
160160
161161 match pred {
162- ty:: PredicateKint :: ForAll ( _) => bug ! ( "unexpected predicate: {:?}" , pred) ,
163- ty:: PredicateKint :: Trait ( ref data, _) => {
162+ ty:: PredicateKind :: ForAll ( _) => bug ! ( "unexpected predicate: {:?}" , pred) ,
163+ ty:: PredicateKind :: Trait ( data, _) => {
164164 // Get predicates declared on the trait.
165165 let predicates = tcx. super_predicates_of ( data. def_id ( ) ) ;
166166
@@ -181,36 +181,36 @@ impl Elaborator<'tcx> {
181181
182182 self . stack . extend ( obligations) ;
183183 }
184- ty:: PredicateKint :: WellFormed ( ..) => {
184+ ty:: PredicateKind :: WellFormed ( ..) => {
185185 // Currently, we do not elaborate WF predicates,
186186 // although we easily could.
187187 }
188- ty:: PredicateKint :: ObjectSafe ( ..) => {
188+ ty:: PredicateKind :: ObjectSafe ( ..) => {
189189 // Currently, we do not elaborate object-safe
190190 // predicates.
191191 }
192- ty:: PredicateKint :: Subtype ( ..) => {
192+ ty:: PredicateKind :: Subtype ( ..) => {
193193 // Currently, we do not "elaborate" predicates like `X <: Y`,
194194 // though conceivably we might.
195195 }
196- ty:: PredicateKint :: Projection ( ..) => {
196+ ty:: PredicateKind :: Projection ( ..) => {
197197 // Nothing to elaborate in a projection predicate.
198198 }
199- ty:: PredicateKint :: ClosureKind ( ..) => {
199+ ty:: PredicateKind :: ClosureKind ( ..) => {
200200 // Nothing to elaborate when waiting for a closure's kind to be inferred.
201201 }
202- ty:: PredicateKint :: ConstEvaluatable ( ..) => {
202+ ty:: PredicateKind :: ConstEvaluatable ( ..) => {
203203 // Currently, we do not elaborate const-evaluatable
204204 // predicates.
205205 }
206- ty:: PredicateKint :: ConstEquate ( ..) => {
206+ ty:: PredicateKind :: ConstEquate ( ..) => {
207207 // Currently, we do not elaborate const-equate
208208 // predicates.
209209 }
210- ty:: PredicateKint :: RegionOutlives ( ..) => {
210+ ty:: PredicateKind :: RegionOutlives ( ..) => {
211211 // Nothing to elaborate from `'a: 'b`.
212212 }
213- ty:: PredicateKint :: TypeOutlives ( ty:: OutlivesPredicate ( ty_max, r_min) ) => {
213+ ty:: PredicateKind :: TypeOutlives ( ty:: OutlivesPredicate ( ty_max, r_min) ) => {
214214 // We know that `T: 'a` for some type `T`. We can
215215 // often elaborate this. For example, if we know that
216216 // `[U]: 'a`, that implies that `U: 'a`. Similarly, if
@@ -240,15 +240,15 @@ impl Elaborator<'tcx> {
240240 if r. is_late_bound ( ) {
241241 None
242242 } else {
243- Some ( ty:: PredicateKint :: RegionOutlives ( ty:: OutlivesPredicate (
243+ Some ( ty:: PredicateKind :: RegionOutlives ( ty:: OutlivesPredicate (
244244 r, r_min,
245245 ) ) )
246246 }
247247 }
248248
249249 Component :: Param ( p) => {
250250 let ty = tcx. mk_ty_param ( p. index , p. name ) ;
251- Some ( ty:: PredicateKint :: TypeOutlives ( ty:: OutlivesPredicate (
251+ Some ( ty:: PredicateKind :: TypeOutlives ( ty:: OutlivesPredicate (
252252 ty, r_min,
253253 ) ) )
254254 }
0 commit comments