Skip to content

Commit 28efcfc

Browse files
committed
rustdoc: Fix erroneous collapsing of second+ inherent impl.
1 parent a3acd10 commit 28efcfc

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/librustdoc/html/static/main.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1745,8 +1745,9 @@
17451745
function autoCollapseAllImpls() {
17461746
// Automatically minimize all non-inherent impls
17471747
onEach(document.getElementsByClassName('impl'), function(n) {
1748-
if (n.id !== 'impl') {
1749-
// non-inherent impl
1748+
// inherent impl ids are like 'impl' or impl-<number>'
1749+
var inherent = (n.id.match(/^impl(?:-\d+)?$/) !== null);
1750+
if (!inherent) {
17501751
onEach(n.childNodes, function(m) {
17511752
if (hasClass(m, "collapse-toggle")) {
17521753
collapseDocs(m, "hide");

0 commit comments

Comments
 (0)