@@ -233,8 +233,8 @@ fn gather_explicit_predicates_of(tcx: TyCtxt<'_>, def_id: DefId) -> ty::GenericP
233
233
}
234
234
_ => bug ! ( ) ,
235
235
} ;
236
- let pred = ty:: Binder :: dummy ( ty:: PredicateKind :: RegionOutlives (
237
- ty:: OutlivesPredicate ( r1, r2) ,
236
+ let pred = ty:: Binder :: dummy ( ty:: PredicateKind :: Clause (
237
+ ty:: Clause :: RegionOutlives ( ty :: OutlivesPredicate ( r1, r2) ) ,
238
238
) )
239
239
. to_predicate ( icx. tcx ) ;
240
240
@@ -299,17 +299,15 @@ fn gather_explicit_predicates_of(tcx: TyCtxt<'_>, def_id: DefId) -> ty::GenericP
299
299
name : duplicate. name . ident ( ) . name ,
300
300
} ) ) ;
301
301
predicates. push ( (
302
- ty:: Binder :: dummy ( ty:: PredicateKind :: RegionOutlives ( ty:: OutlivesPredicate (
303
- orig_region,
304
- dup_region,
302
+ ty:: Binder :: dummy ( ty:: PredicateKind :: Clause ( ty:: Clause :: RegionOutlives (
303
+ ty:: OutlivesPredicate ( orig_region, dup_region) ,
305
304
) ) )
306
305
. to_predicate ( icx. tcx ) ,
307
306
duplicate. span ,
308
307
) ) ;
309
308
predicates. push ( (
310
- ty:: Binder :: dummy ( ty:: PredicateKind :: RegionOutlives ( ty:: OutlivesPredicate (
311
- dup_region,
312
- orig_region,
309
+ ty:: Binder :: dummy ( ty:: PredicateKind :: Clause ( ty:: Clause :: RegionOutlives (
310
+ ty:: OutlivesPredicate ( dup_region, orig_region) ,
313
311
) ) )
314
312
. to_predicate ( icx. tcx ) ,
315
313
duplicate. span ,
@@ -426,11 +424,13 @@ pub(super) fn explicit_predicates_of<'tcx>(
426
424
. iter ( )
427
425
. copied ( )
428
426
. filter ( |( pred, _) | match pred. kind ( ) . skip_binder ( ) {
429
- ty:: PredicateKind :: Trait ( tr) => !is_assoc_item_ty ( tr. self_ty ( ) ) ,
430
- ty:: PredicateKind :: Projection ( proj) => {
427
+ ty:: PredicateKind :: Clause ( ty :: Clause :: Trait ( tr) ) => !is_assoc_item_ty ( tr. self_ty ( ) ) ,
428
+ ty:: PredicateKind :: Clause ( ty :: Clause :: Projection ( proj) ) => {
431
429
!is_assoc_item_ty ( proj. projection_ty . self_ty ( ) )
432
430
}
433
- ty:: PredicateKind :: TypeOutlives ( outlives) => !is_assoc_item_ty ( outlives. 0 ) ,
431
+ ty:: PredicateKind :: Clause ( ty:: Clause :: TypeOutlives ( outlives) ) => {
432
+ !is_assoc_item_ty ( outlives. 0 )
433
+ }
434
434
_ => true ,
435
435
} )
436
436
. collect ( ) ;
@@ -566,7 +566,9 @@ pub(super) fn super_predicates_that_define_assoc_type(
566
566
// which will, in turn, reach indirect supertraits.
567
567
for & ( pred, span) in superbounds {
568
568
debug ! ( "superbound: {:?}" , pred) ;
569
- if let ty:: PredicateKind :: Trait ( bound) = pred. kind ( ) . skip_binder ( ) {
569
+ if let ty:: PredicateKind :: Clause ( ty:: Clause :: Trait ( bound) ) =
570
+ pred. kind ( ) . skip_binder ( )
571
+ {
570
572
tcx. at ( span) . super_predicates_of ( bound. def_id ( ) ) ;
571
573
}
572
574
}
@@ -666,7 +668,7 @@ pub(super) fn type_param_predicates(
666
668
)
667
669
. into_iter ( )
668
670
. filter ( |( predicate, _) | match predicate. kind ( ) . skip_binder ( ) {
669
- ty:: PredicateKind :: Trait ( data) => data. self_ty ( ) . is_param ( index) ,
671
+ ty:: PredicateKind :: Clause ( ty :: Clause :: Trait ( data) ) => data. self_ty ( ) . is_param ( index) ,
670
672
_ => false ,
671
673
} ) ,
672
674
) ;
0 commit comments