@@ -156,7 +156,7 @@ impl<'tcx> Clean<'tcx, Option<GenericBound>> for hir::GenericBound<'tcx> {
156
156
return None ;
157
157
}
158
158
159
- GenericBound :: TraitBound ( t . clean ( cx) , modifier)
159
+ GenericBound :: TraitBound ( clean_poly_trait_ref ( t , cx) , modifier)
160
160
}
161
161
} )
162
162
}
@@ -1001,17 +1001,18 @@ fn clean_trait_ref<'tcx>(trait_ref: &hir::TraitRef<'tcx>, cx: &mut DocContext<'t
1001
1001
path
1002
1002
}
1003
1003
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 ( ) ,
1015
1016
}
1016
1017
}
1017
1018
@@ -1515,7 +1516,7 @@ pub(crate) fn clean_ty<'tcx>(ty: &hir::Ty<'tcx>, cx: &mut DocContext<'tcx>) -> T
1515
1516
}
1516
1517
TyKind :: Path ( _) => clean_qpath ( ty, cx) ,
1517
1518
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 ( ) ;
1519
1520
let lifetime =
1520
1521
if !lifetime. is_elided ( ) { Some ( clean_lifetime ( * lifetime, cx) ) } else { None } ;
1521
1522
DynTrait ( bounds, lifetime)
0 commit comments