@@ -995,18 +995,16 @@ fn clean_fn_decl_from_did_and_sig<'tcx>(
995
995
}
996
996
}
997
997
998
- impl < ' tcx > Clean < ' tcx , Path > for hir:: TraitRef < ' tcx > {
999
- fn clean ( & self , cx : & mut DocContext < ' tcx > ) -> Path {
1000
- let path = clean_path ( self . path , cx) ;
1001
- register_res ( cx, path. res ) ;
1002
- path
1003
- }
998
+ fn clean_trait_ref < ' tcx > ( trait_ref : & hir:: TraitRef < ' tcx > , cx : & mut DocContext < ' tcx > ) -> Path {
999
+ let path = clean_path ( trait_ref. path , cx) ;
1000
+ register_res ( cx, path. res ) ;
1001
+ path
1004
1002
}
1005
1003
1006
1004
impl < ' tcx > Clean < ' tcx , PolyTrait > for hir:: PolyTraitRef < ' tcx > {
1007
1005
fn clean ( & self , cx : & mut DocContext < ' tcx > ) -> PolyTrait {
1008
1006
PolyTrait {
1009
- trait_ : self . trait_ref . clean ( cx) ,
1007
+ trait_ : clean_trait_ref ( & self . trait_ref , cx) ,
1010
1008
generic_params : self
1011
1009
. bound_generic_params
1012
1010
. iter ( )
@@ -1995,7 +1993,7 @@ fn clean_impl<'tcx>(
1995
1993
) -> Vec < Item > {
1996
1994
let tcx = cx. tcx ;
1997
1995
let mut ret = Vec :: new ( ) ;
1998
- let trait_ = impl_. of_trait . as_ref ( ) . map ( |t| t . clean ( cx) ) ;
1996
+ let trait_ = impl_. of_trait . as_ref ( ) . map ( |t| clean_trait_ref ( t , cx) ) ;
1999
1997
let items =
2000
1998
impl_. items . iter ( ) . map ( |ii| tcx. hir ( ) . impl_item ( ii. id ) . clean ( cx) ) . collect :: < Vec < _ > > ( ) ;
2001
1999
let def_id = tcx. hir ( ) . local_def_id ( hir_id) ;
0 commit comments