Skip to content

Commit 98bd22b

Browse files
authored
Rollup merge of #71842 - tspiteri:doc-impl-const, r=GuillaumeGomez
doc: make impl block collapsible if it has an associated constant Fixes #71822.
2 parents bc10b68 + da18df2 commit 98bd22b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Diff for: src/librustdoc/html/static/main.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -2374,7 +2374,9 @@ function defocusSearchBar() {
23742374
if (!next) {
23752375
return;
23762376
}
2377-
if (next.getElementsByClassName("method").length > 0 && hasClass(e, "impl")) {
2377+
if (hasClass(e, "impl") &&
2378+
(next.getElementsByClassName("method").length > 0 ||
2379+
next.getElementsByClassName("associatedconstant").length > 0)) {
23782380
insertAfter(toggle.cloneNode(true), e.childNodes[e.childNodes.length - 1]);
23792381
}
23802382
};

0 commit comments

Comments
 (0)