Skip to content

Commit

Permalink
Rollup merge of #71842 - tspiteri:doc-impl-const, r=GuillaumeGomez
Browse files Browse the repository at this point in the history
doc: make impl block collapsible if it has an associated constant

Fixes #71822.
  • Loading branch information
Dylan-DPC authored Jun 8, 2020
2 parents bc10b68 + da18df2 commit 98bd22b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/librustdoc/html/static/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -2374,7 +2374,9 @@ function defocusSearchBar() {
if (!next) {
return;
}
if (next.getElementsByClassName("method").length > 0 && hasClass(e, "impl")) {
if (hasClass(e, "impl") &&
(next.getElementsByClassName("method").length > 0 ||
next.getElementsByClassName("associatedconstant").length > 0)) {
insertAfter(toggle.cloneNode(true), e.childNodes[e.childNodes.length - 1]);
}
};
Expand Down

0 comments on commit 98bd22b

Please sign in to comment.