@@ -490,7 +490,6 @@ fn settings(root_path: &str, suffix: &str, themes: &[StylePath]) -> Result<Strin
490490 ( "auto-hide-method-docs" , "Auto-hide item methods' documentation" , false ) . into ( ) ,
491491 ( "auto-hide-trait-implementations" , "Auto-hide trait implementation documentation" , false )
492492 . into ( ) ,
493- ( "auto-collapse-implementors" , "Auto-hide implementors of a trait" , true ) . into ( ) ,
494493 ( "go-to-only-result" , "Directly go to item in search if there is only one result" , false )
495494 . into ( ) ,
496495 ( "line-numbers" , "Show line numbers on code examples" , false ) . into ( ) ,
@@ -1543,7 +1542,10 @@ fn render_impl(
15431542 }
15441543 }
15451544 if render_mode == RenderMode :: Normal {
1546- let toggled = !impl_items. is_empty ( ) || !default_impl_items. is_empty ( ) ;
1545+ let on_trait_page = matches ! ( * parent. kind, clean:: ItemKind :: TraitItem ( _) ) ;
1546+ let has_impl_items = !( impl_items. is_empty ( ) && default_impl_items. is_empty ( ) ) ;
1547+ let toggled = !on_trait_page && has_impl_items;
1548+ let is_implementing_trait = i. inner_impl ( ) . trait_ . is_some ( ) ;
15471549 if toggled {
15481550 close_tags. insert_str ( 0 , "</details>" ) ;
15491551 write ! ( w, "<details class=\" rustdoc-toggle implementors-toggle\" open>" ) ;
@@ -1571,21 +1573,23 @@ fn render_impl(
15711573 }
15721574 }
15731575
1574- if let Some ( ref dox) = cx. shared . maybe_collapsed_doc_value ( & i. impl_item ) {
1575- let mut ids = cx. id_map . borrow_mut ( ) ;
1576- write ! (
1577- w,
1578- "<div class=\" docblock\" >{}</div>" ,
1579- Markdown (
1580- & * dox,
1581- & i. impl_item. links( cx) ,
1582- & mut ids,
1583- cx. shared. codes,
1584- cx. shared. edition( ) ,
1585- & cx. shared. playground
1586- )
1587- . into_string( )
1588- ) ;
1576+ if !on_trait_page {
1577+ if let Some ( ref dox) = cx. shared . maybe_collapsed_doc_value ( & i. impl_item ) {
1578+ let mut ids = cx. id_map . borrow_mut ( ) ;
1579+ write ! (
1580+ w,
1581+ "<div class=\" docblock\" >{}</div>" ,
1582+ Markdown (
1583+ & * dox,
1584+ & i. impl_item. links( cx) ,
1585+ & mut ids,
1586+ cx. shared. codes,
1587+ cx. shared. edition( ) ,
1588+ & cx. shared. playground
1589+ )
1590+ . into_string( )
1591+ ) ;
1592+ }
15891593 }
15901594 }
15911595 if !default_impl_items. is_empty ( ) || !impl_items. is_empty ( ) {
0 commit comments