about summary refs log tree commit diff
diff options
context:
space:
mode:
authorVitaly _Vi Shukela <vi0oss@gmail.com>2018-02-01 17:07:43 +0300
committerVitaly _Vi Shukela <vi0oss@gmail.com>2018-02-01 17:07:43 +0300
commit28efcfc0830133c058f9443f5934c6f9c0aa7132 (patch)
tree0d18498e3d5be63bf5d90e0f32672246c1517e16
parenta3acd10297ec7ddc4d1389cbf3532351f1d4a8c8 (diff)
downloadrust-28efcfc0830133c058f9443f5934c6f9c0aa7132.tar.gz
rust-28efcfc0830133c058f9443f5934c6f9c0aa7132.zip
rustdoc: Fix erroneous collapsing of second+ inherent impl.
-rw-r--r--src/librustdoc/html/static/main.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/librustdoc/html/static/main.js b/src/librustdoc/html/static/main.js
index befa1cc53f3..3d9841ec526 100644
--- a/src/librustdoc/html/static/main.js
+++ b/src/librustdoc/html/static/main.js
@@ -1745,8 +1745,9 @@
     function autoCollapseAllImpls() {
         // Automatically minimize all non-inherent impls
         onEach(document.getElementsByClassName('impl'), function(n) {
-            if (n.id !== 'impl') {
-                // non-inherent impl
+            // inherent impl ids are like 'impl' or impl-<number>'
+            var inherent = (n.id.match(/^impl(?:-\d+)?$/) !== null);
+            if (!inherent) {
                 onEach(n.childNodes, function(m) {
                     if (hasClass(m, "collapse-toggle")) {
                         collapseDocs(m, "hide");