@@ -156,7 +156,7 @@ impl<'tcx> Clean<'tcx, Option<GenericBound>> for hir::GenericBound<'tcx> {
156156 return None ;
157157 }
158158
159- GenericBound :: TraitBound ( t . clean ( cx) , modifier)
159+ GenericBound :: TraitBound ( clean_poly_trait_ref ( t , cx) , modifier)
160160 }
161161 } )
162162 }
@@ -1001,17 +1001,18 @@ fn clean_trait_ref<'tcx>(trait_ref: &hir::TraitRef<'tcx>, cx: &mut DocContext<'t
10011001 path
10021002}
10031003
1004- impl < ' tcx > Clean < ' tcx , PolyTrait > for hir:: PolyTraitRef < ' tcx > {
1005- fn clean ( & self , cx : & mut DocContext < ' tcx > ) -> PolyTrait {
1006- PolyTrait {
1007- trait_ : clean_trait_ref ( & self . trait_ref , cx) ,
1008- generic_params : self
1009- . bound_generic_params
1010- . iter ( )
1011- . filter ( |p| !is_elided_lifetime ( p) )
1012- . map ( |x| clean_generic_param ( cx, None , x) )
1013- . collect ( ) ,
1014- }
1004+ fn clean_poly_trait_ref < ' tcx > (
1005+ poly_trait_ref : & hir:: PolyTraitRef < ' tcx > ,
1006+ cx : & mut DocContext < ' tcx > ,
1007+ ) -> PolyTrait {
1008+ PolyTrait {
1009+ trait_ : clean_trait_ref ( & poly_trait_ref. trait_ref , cx) ,
1010+ generic_params : poly_trait_ref
1011+ . bound_generic_params
1012+ . iter ( )
1013+ . filter ( |p| !is_elided_lifetime ( p) )
1014+ . map ( |x| clean_generic_param ( cx, None , x) )
1015+ . collect ( ) ,
10151016 }
10161017}
10171018
@@ -1515,7 +1516,7 @@ pub(crate) fn clean_ty<'tcx>(ty: &hir::Ty<'tcx>, cx: &mut DocContext<'tcx>) -> T
15151516 }
15161517 TyKind :: Path ( _) => clean_qpath ( ty, cx) ,
15171518 TyKind :: TraitObject ( bounds, ref lifetime, _) => {
1518- let bounds = bounds. iter ( ) . map ( |bound| bound . clean ( cx) ) . collect ( ) ;
1519+ let bounds = bounds. iter ( ) . map ( |bound| clean_poly_trait_ref ( bound , cx) ) . collect ( ) ;
15191520 let lifetime =
15201521 if !lifetime. is_elided ( ) { Some ( clean_lifetime ( * lifetime, cx) ) } else { None } ;
15211522 DynTrait ( bounds, lifetime)
0 commit comments