@@ -1985,7 +1985,7 @@ fn sidebar_assoc_items(cx: &Context<'_>, out: &mut Buffer, it: &clean::Item) {
19851985            { 
19861986                let  mut  derefs = FxHashSet :: default ( ) ; 
19871987                derefs. insert ( did) ; 
1988-                 sidebar_deref_methods ( cx,  out,  impl_,  v,  & mut  derefs) ; 
1988+                 sidebar_deref_methods ( cx,  out,  impl_,  v,  & mut  derefs,   & mut  used_links ) ; 
19891989            } 
19901990
19911991            let  format_impls = |impls :  Vec < & Impl > ,  id_map :  & mut  IdMap | { 
@@ -2057,6 +2057,7 @@ fn sidebar_deref_methods(
20572057    impl_ :  & Impl , 
20582058    v :  & [ Impl ] , 
20592059    derefs :  & mut  FxHashSet < DefId > , 
2060+     used_links :  & mut  FxHashSet < String > , 
20602061)  { 
20612062    let  c = cx. cache ( ) ; 
20622063
@@ -2089,13 +2090,10 @@ fn sidebar_deref_methods(
20892090            . and_then ( |did| c. impls . get ( & did) ) ; 
20902091        if  let  Some ( impls)  = inner_impl { 
20912092            debug ! ( "found inner_impl: {:?}" ,  impls) ; 
2092-             let  mut  used_links = FxHashSet :: default ( ) ; 
20932093            let  mut  ret = impls
20942094                . iter ( ) 
20952095                . filter ( |i| i. inner_impl ( ) . trait_ . is_none ( ) ) 
2096-                 . flat_map ( |i| { 
2097-                     get_methods ( i. inner_impl ( ) ,  true ,  & mut  used_links,  deref_mut,  cx. tcx ( ) ) 
2098-                 } ) 
2096+                 . flat_map ( |i| get_methods ( i. inner_impl ( ) ,  true ,  used_links,  deref_mut,  cx. tcx ( ) ) ) 
20992097                . collect :: < Vec < _ > > ( ) ; 
21002098            if  !ret. is_empty ( )  { 
21012099                let  id = if  let  Some ( target_def_id)  = real_target. def_id ( c)  { 
@@ -2124,7 +2122,14 @@ fn sidebar_deref_methods(
21242122                        . map ( |t| Some ( t. def_id ( ) )  == cx. tcx ( ) . lang_items ( ) . deref_trait ( ) ) 
21252123                        . unwrap_or ( false ) 
21262124                } )  { 
2127-                     sidebar_deref_methods ( cx,  out,  target_deref_impl,  target_impls,  derefs) ; 
2125+                     sidebar_deref_methods ( 
2126+                         cx, 
2127+                         out, 
2128+                         target_deref_impl, 
2129+                         target_impls, 
2130+                         derefs, 
2131+                         used_links, 
2132+                     ) ; 
21282133                } 
21292134            } 
21302135        } 
0 commit comments