@@ -330,6 +330,7 @@ impl Clean<WherePredicate> for hir::WherePredicate<'_> {
330
330
hir:: WherePredicate :: BoundPredicate ( ref wbp) => WherePredicate :: BoundPredicate {
331
331
ty : wbp. bounded_ty . clean ( cx) ,
332
332
bounds : wbp. bounds . clean ( cx) ,
333
+ bound_params : wbp. bound_generic_params . into_iter ( ) . map ( |x| x. clean ( cx) ) . collect ( ) ,
333
334
} ,
334
335
335
336
hir:: WherePredicate :: RegionPredicate ( ref wrp) => WherePredicate :: RegionPredicate {
@@ -370,6 +371,7 @@ impl<'a> Clean<WherePredicate> for ty::PolyTraitPredicate<'a> {
370
371
WherePredicate :: BoundPredicate {
371
372
ty : poly_trait_ref. skip_binder ( ) . self_ty ( ) . clean ( cx) ,
372
373
bounds : vec ! [ poly_trait_ref. clean( cx) ] ,
374
+ bound_params : Vec :: new ( ) ,
373
375
}
374
376
}
375
377
}
@@ -402,6 +404,7 @@ impl<'tcx> Clean<Option<WherePredicate>> for ty::OutlivesPredicate<Ty<'tcx>, ty:
402
404
Some ( WherePredicate :: BoundPredicate {
403
405
ty : ty. clean ( cx) ,
404
406
bounds : vec ! [ GenericBound :: Outlives ( lt. clean( cx) . expect( "failed to clean lifetimes" ) ) ] ,
407
+ bound_params : Vec :: new ( ) ,
405
408
} )
406
409
}
407
410
}
@@ -567,7 +570,9 @@ impl Clean<Generics> for hir::Generics<'_> {
567
570
// to where predicates when such cases occur.
568
571
for where_pred in & mut generics. where_predicates {
569
572
match * where_pred {
570
- WherePredicate :: BoundPredicate { ty : Generic ( ref name) , ref mut bounds } => {
573
+ WherePredicate :: BoundPredicate {
574
+ ty : Generic ( ref name) , ref mut bounds, ..
575
+ } => {
571
576
if bounds. is_empty ( ) {
572
577
for param in & mut generics. params {
573
578
match param. kind {
@@ -721,7 +726,7 @@ impl<'a, 'tcx> Clean<Generics> for (&'a ty::Generics, ty::GenericPredicates<'tcx
721
726
// handled in cleaning associated types
722
727
let mut sized_params = FxHashSet :: default ( ) ;
723
728
where_predicates. retain ( |pred| match * pred {
724
- WP :: BoundPredicate { ty : Generic ( ref g) , ref bounds } => {
729
+ WP :: BoundPredicate { ty : Generic ( ref g) , ref bounds, .. } => {
725
730
if bounds. iter ( ) . any ( |b| b. is_sized_bound ( cx) ) {
726
731
sized_params. insert ( * g) ;
727
732
false
@@ -741,6 +746,7 @@ impl<'a, 'tcx> Clean<Generics> for (&'a ty::Generics, ty::GenericPredicates<'tcx
741
746
where_predicates. push ( WP :: BoundPredicate {
742
747
ty : Type :: Generic ( tp. name ) ,
743
748
bounds : vec ! [ GenericBound :: maybe_sized( cx) ] ,
749
+ bound_params : Vec :: new ( ) ,
744
750
} )
745
751
}
746
752
}
@@ -1117,6 +1123,7 @@ impl Clean<Item> for ty::AssocItem {
1117
1123
WherePredicate :: BoundPredicate {
1118
1124
ty : QPath { ref name, ref self_type, ref trait_, .. } ,
1119
1125
ref bounds,
1126
+ ..
1120
1127
} => ( name, self_type, trait_, bounds) ,
1121
1128
_ => return None ,
1122
1129
} ;
0 commit comments