@@ -1973,21 +1973,18 @@ fn sidebar_assoc_items(cx: &Context<'_>, out: &mut Buffer, it: &clean::Item) {
19731973                let  mut  ret = impls
19741974                    . iter ( ) 
19751975                    . filter_map ( |it| { 
1976-                         if  let  Some ( ref  i)  = it. inner_impl ( ) . trait_  { 
1977-                             let  i_display = format ! ( "{:#}" ,  i. print( cx) ) ; 
1978-                             let  out = Escape ( & i_display) ; 
1979-                             let  encoded =
1980-                                 id_map. derive ( small_url_encode ( format ! ( "impl-{:#}" ,  i. print( cx) ) ) ) ; 
1981-                             let  prefix = match  it. inner_impl ( ) . polarity  { 
1982-                                 ty:: ImplPolarity :: Positive  | ty:: ImplPolarity :: Reservation  => "" , 
1983-                                 ty:: ImplPolarity :: Negative  => "!" , 
1984-                             } ; 
1985-                             let  generated =
1986-                                 format ! ( "<a href=\" #{}\" >{}{}</a>" ,  encoded,  prefix,  out) ; 
1987-                             if  links. insert ( generated. clone ( ) )  {  Some ( generated)  }  else  {  None  } 
1988-                         }  else  { 
1989-                             None 
1990-                         } 
1976+                         let  trait_ = it. inner_impl ( ) . trait_ . as_ref ( ) ?; 
1977+                         let  encoded =
1978+                             id_map. derive ( get_id_for_impl ( & it. inner_impl ( ) . for_ ,  Some ( trait_) ,  cx) ) ; 
1979+ 
1980+                         let  i_display = format ! ( "{:#}" ,  trait_. print( cx) ) ; 
1981+                         let  out = Escape ( & i_display) ; 
1982+                         let  prefix = match  it. inner_impl ( ) . polarity  { 
1983+                             ty:: ImplPolarity :: Positive  | ty:: ImplPolarity :: Reservation  => "" , 
1984+                             ty:: ImplPolarity :: Negative  => "!" , 
1985+                         } ; 
1986+                         let  generated = format ! ( "<a href=\" #{}\" >{}{}</a>" ,  encoded,  prefix,  out) ; 
1987+                         if  links. insert ( generated. clone ( ) )  {  Some ( generated)  }  else  {  None  } 
19911988                    } ) 
19921989                    . collect :: < Vec < String > > ( ) ; 
19931990                ret. sort ( ) ; 
0 commit comments