File tree Expand file tree Collapse file tree 3 files changed +24
-6
lines changed Expand file tree Collapse file tree 3 files changed +24
-6
lines changed Original file line number Diff line number Diff line change @@ -1545,7 +1545,7 @@ fn render_impl(
15451545 let open_details = |close_tags : & mut String | {
15461546 if toggled {
15471547 close_tags. insert_str ( 0 , "</details>" ) ;
1548- "<details class=\" rustdoc-toggle implementors-toggle\" open ><summary>"
1548+ "<details class=\" rustdoc-toggle implementors-toggle\" ><summary>"
15491549 } else {
15501550 ""
15511551 }
Original file line number Diff line number Diff line change @@ -776,12 +776,29 @@ function hideThemeButtonState() {
776776
777777 var hideMethodDocs = getSettingValue ( "auto-hide-method-docs" ) === "true" ;
778778 var hideImplementors = getSettingValue ( "auto-collapse-implementors" ) !== "false" ;
779+ var hideImplementations = getSettingValue ( "auto-hide-trait-implementations" ) !== "false" ;
779780 var hideLargeItemContents = getSettingValue ( "auto-hide-large-items" ) !== "false" ;
780781
781- onEachLazy ( document . getElementsByTagName ( "details" ) , function ( e ) {
782- var showLargeItem = ! hideLargeItemContents && hasClass ( e , "type-contents-toggle" ) ;
783- var showImplementor = ! hideImplementors && hasClass ( e , "implementors-toggle" ) ;
784- if ( showLargeItem || showImplementor ) {
782+ function openImplementors ( id ) {
783+ var list = document . getElementById ( id ) ;
784+ if ( list !== null ) {
785+ onEachLazy ( list . getElementsByClassName ( "implementors-toggle" ) , function ( e ) {
786+ e . open = true ;
787+ } ) ;
788+ }
789+ }
790+
791+ if ( ! hideImplementations ) {
792+ openImplementors ( "trait-implementations-list" ) ;
793+ openImplementors ( "blanket-implementations-list" ) ;
794+ }
795+
796+ if ( ! hideImplementors ) {
797+ openImplementors ( "implementors-list" ) ;
798+ }
799+
800+ onEachLazy ( document . getElementsByClassName ( "rustdoc-toggle" ) , function ( e ) {
801+ if ( ! hideLargeItemContents && hasClass ( e , "type-contents-toggle" ) ) {
785802 e . open = true ;
786803 }
787804 if ( hideMethodDocs && hasClass ( e , "method-toggle" ) ) {
Original file line number Diff line number Diff line change @@ -65,7 +65,8 @@ impl T for S2 {
6565}
6666
6767// @has manual_impl/struct.S3.html '//*[@class="trait"]' 'T'
68- // @has - '//details[@open=""]/div[@class="docblock"]' 'Docs associated with the S3 trait implementation.'
68+ // @has - '//details/div[@class="docblock"]' 'Docs associated with the S3 trait implementation.'
69+ // @!has - '//details[@open=""]/div[@class="docblock"]' 'Docs associated with the S3 trait implementation.'
6970// @has - '//details[@open=""]/div[@class="docblock"]' 'Docs associated with the S3 trait b_method implementation.'
7071// @!has - '//div[@class="impl-items"]/details[@open=""]//div[@class="docblock"]' 'Docs associated with the trait a_method definition.'
7172// @has - '//div[@class="impl-items"]/details//div[@class="docblock"]' 'Docs associated with the trait a_method definition.'
You can’t perform that action at this time.
0 commit comments