@@ -11,39 +11,39 @@ pub fn anonymize_predicate<'tcx>(
1111 pred : & ty:: Predicate < ' tcx > ,
1212) -> ty:: Predicate < ' tcx > {
1313 match * pred {
14- ty:: Predicate :: Trait ( ref data, constness) => {
15- ty:: Predicate :: Trait ( tcx. anonymize_late_bound_regions ( data) , constness)
14+ ty:: PredicateKind :: Trait ( ref data, constness) => {
15+ ty:: PredicateKind :: Trait ( tcx. anonymize_late_bound_regions ( data) , constness)
1616 }
1717
18- ty:: Predicate :: RegionOutlives ( ref data) => {
19- ty:: Predicate :: RegionOutlives ( tcx. anonymize_late_bound_regions ( data) )
18+ ty:: PredicateKind :: RegionOutlives ( ref data) => {
19+ ty:: PredicateKind :: RegionOutlives ( tcx. anonymize_late_bound_regions ( data) )
2020 }
2121
22- ty:: Predicate :: TypeOutlives ( ref data) => {
23- ty:: Predicate :: TypeOutlives ( tcx. anonymize_late_bound_regions ( data) )
22+ ty:: PredicateKind :: TypeOutlives ( ref data) => {
23+ ty:: PredicateKind :: TypeOutlives ( tcx. anonymize_late_bound_regions ( data) )
2424 }
2525
26- ty:: Predicate :: Projection ( ref data) => {
27- ty:: Predicate :: Projection ( tcx. anonymize_late_bound_regions ( data) )
26+ ty:: PredicateKind :: Projection ( ref data) => {
27+ ty:: PredicateKind :: Projection ( tcx. anonymize_late_bound_regions ( data) )
2828 }
2929
30- ty:: Predicate :: WellFormed ( data) => ty:: Predicate :: WellFormed ( data) ,
30+ ty:: PredicateKind :: WellFormed ( data) => ty:: PredicateKind :: WellFormed ( data) ,
3131
32- ty:: Predicate :: ObjectSafe ( data) => ty:: Predicate :: ObjectSafe ( data) ,
32+ ty:: PredicateKind :: ObjectSafe ( data) => ty:: PredicateKind :: ObjectSafe ( data) ,
3333
34- ty:: Predicate :: ClosureKind ( closure_def_id, closure_substs, kind) => {
35- ty:: Predicate :: ClosureKind ( closure_def_id, closure_substs, kind)
34+ ty:: PredicateKind :: ClosureKind ( closure_def_id, closure_substs, kind) => {
35+ ty:: PredicateKind :: ClosureKind ( closure_def_id, closure_substs, kind)
3636 }
3737
38- ty:: Predicate :: Subtype ( ref data) => {
39- ty:: Predicate :: Subtype ( tcx. anonymize_late_bound_regions ( data) )
38+ ty:: PredicateKind :: Subtype ( ref data) => {
39+ ty:: PredicateKind :: Subtype ( tcx. anonymize_late_bound_regions ( data) )
4040 }
4141
42- ty:: Predicate :: ConstEvaluatable ( def_id, substs) => {
43- ty:: Predicate :: ConstEvaluatable ( def_id, substs)
42+ ty:: PredicateKind :: ConstEvaluatable ( def_id, substs) => {
43+ ty:: PredicateKind :: ConstEvaluatable ( def_id, substs)
4444 }
4545
46- ty:: Predicate :: ConstEquate ( c1, c2) => ty:: Predicate :: ConstEquate ( c1, c2) ,
46+ ty:: PredicateKind :: ConstEquate ( c1, c2) => ty:: Predicate :: ConstEquate ( c1, c2) ,
4747 }
4848}
4949
@@ -146,7 +146,7 @@ impl Elaborator<'tcx> {
146146 fn elaborate ( & mut self , obligation : & PredicateObligation < ' tcx > ) {
147147 let tcx = self . visited . tcx ;
148148 match obligation. predicate {
149- ty:: Predicate :: Trait ( ref data, _) => {
149+ ty:: PredicateKind :: Trait ( ref data, _) => {
150150 // Get predicates declared on the trait.
151151 let predicates = tcx. super_predicates_of ( data. def_id ( ) ) ;
152152
@@ -167,36 +167,36 @@ impl Elaborator<'tcx> {
167167
168168 self . stack . extend ( obligations) ;
169169 }
170- ty:: Predicate :: WellFormed ( ..) => {
170+ ty:: PredicateKind :: WellFormed ( ..) => {
171171 // Currently, we do not elaborate WF predicates,
172172 // although we easily could.
173173 }
174- ty:: Predicate :: ObjectSafe ( ..) => {
174+ ty:: PredicateKind :: ObjectSafe ( ..) => {
175175 // Currently, we do not elaborate object-safe
176176 // predicates.
177177 }
178- ty:: Predicate :: Subtype ( ..) => {
178+ ty:: PredicateKind :: Subtype ( ..) => {
179179 // Currently, we do not "elaborate" predicates like `X <: Y`,
180180 // though conceivably we might.
181181 }
182- ty:: Predicate :: Projection ( ..) => {
182+ ty:: PredicateKind :: Projection ( ..) => {
183183 // Nothing to elaborate in a projection predicate.
184184 }
185- ty:: Predicate :: ClosureKind ( ..) => {
185+ ty:: PredicateKind :: ClosureKind ( ..) => {
186186 // Nothing to elaborate when waiting for a closure's kind to be inferred.
187187 }
188- ty:: Predicate :: ConstEvaluatable ( ..) => {
188+ ty:: PredicateKind :: ConstEvaluatable ( ..) => {
189189 // Currently, we do not elaborate const-evaluatable
190190 // predicates.
191191 }
192- ty:: Predicate :: ConstEquate ( ..) => {
192+ ty:: PredicateKind :: ConstEquate ( ..) => {
193193 // Currently, we do not elaborate const-equate
194194 // predicates.
195195 }
196- ty:: Predicate :: RegionOutlives ( ..) => {
196+ ty:: PredicateKind :: RegionOutlives ( ..) => {
197197 // Nothing to elaborate from `'a: 'b`.
198198 }
199- ty:: Predicate :: TypeOutlives ( ref data) => {
199+ ty:: PredicateKind :: TypeOutlives ( ref data) => {
200200 // We know that `T: 'a` for some type `T`. We can
201201 // often elaborate this. For example, if we know that
202202 // `[U]: 'a`, that implies that `U: 'a`. Similarly, if
@@ -228,15 +228,15 @@ impl Elaborator<'tcx> {
228228 if r. is_late_bound ( ) {
229229 None
230230 } else {
231- Some ( ty:: Predicate :: RegionOutlives ( ty:: Binder :: dummy (
231+ Some ( ty:: PredicateKind :: RegionOutlives ( ty:: Binder :: dummy (
232232 ty:: OutlivesPredicate ( r, r_min) ,
233233 ) ) )
234234 }
235235 }
236236
237237 Component :: Param ( p) => {
238238 let ty = tcx. mk_ty_param ( p. index , p. name ) ;
239- Some ( ty:: Predicate :: TypeOutlives ( ty:: Binder :: dummy (
239+ Some ( ty:: PredicateKind :: TypeOutlives ( ty:: Binder :: dummy (
240240 ty:: OutlivesPredicate ( ty, r_min) ,
241241 ) ) )
242242 }
@@ -317,7 +317,7 @@ impl<'tcx, I: Iterator<Item = PredicateObligation<'tcx>>> Iterator for FilterToT
317317
318318 fn next ( & mut self ) -> Option < ty:: PolyTraitRef < ' tcx > > {
319319 while let Some ( obligation) = self . base_iterator . next ( ) {
320- if let ty:: Predicate :: Trait ( data, _) = obligation. predicate {
320+ if let ty:: PredicateKind :: Trait ( data, _) = obligation. predicate {
321321 return Some ( data. to_poly_trait_ref ( ) ) ;
322322 }
323323 }
0 commit comments