@@ -304,7 +304,7 @@ pub(crate) fn clean_predicate<'tcx>(
304304 clean_region_outlives_predicate ( pred)
305305 }
306306 ty:: PredicateKind :: Clause ( ty:: Clause :: TypeOutlives ( pred) ) => {
307- clean_type_outlives_predicate ( pred, cx)
307+ clean_type_outlives_predicate ( bound_predicate . rebind ( pred) , cx)
308308 }
309309 ty:: PredicateKind :: Clause ( ty:: Clause :: Projection ( pred) ) => {
310310 Some ( clean_projection_predicate ( bound_predicate. rebind ( pred) , cx) )
@@ -345,7 +345,7 @@ fn clean_poly_trait_predicate<'tcx>(
345345}
346346
347347fn clean_region_outlives_predicate < ' tcx > (
348- pred : ty:: OutlivesPredicate < ty :: Region < ' tcx > , ty :: Region < ' tcx > > ,
348+ pred : ty:: RegionOutlivesPredicate < ' tcx > ,
349349) -> Option < WherePredicate > {
350350 let ty:: OutlivesPredicate ( a, b) = pred;
351351
@@ -358,13 +358,13 @@ fn clean_region_outlives_predicate<'tcx>(
358358}
359359
360360fn clean_type_outlives_predicate < ' tcx > (
361- pred : ty:: OutlivesPredicate < Ty < ' tcx > , ty:: Region < ' tcx > > ,
361+ pred : ty:: Binder < ' tcx , ty:: TypeOutlivesPredicate < ' tcx > > ,
362362 cx : & mut DocContext < ' tcx > ,
363363) -> Option < WherePredicate > {
364- let ty:: OutlivesPredicate ( ty, lt) = pred;
364+ let ty:: OutlivesPredicate ( ty, lt) = pred. skip_binder ( ) ;
365365
366366 Some ( WherePredicate :: BoundPredicate {
367- ty : clean_middle_ty ( ty :: Binder :: dummy ( ty) , cx, None ) ,
367+ ty : clean_middle_ty ( pred . rebind ( ty) , cx, None ) ,
368368 bounds : vec ! [ GenericBound :: Outlives (
369369 clean_middle_region( lt) . expect( "failed to clean lifetimes" ) ,
370370 ) ] ,
0 commit comments