about summary refs log tree commit diff
path: root/src/librustdoc/html/static/js/main.js
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume.gomez@huawei.com>2021-11-04 16:27:02 +0100
committerGuillaume Gomez <guillaume.gomez@huawei.com>2021-11-04 20:07:24 +0100
commitaa17e1c47f8f3598f219b3ccc4d44fd423f98e60 (patch)
tree8206c76225a239c2b6e6bcad331839f719f0bd24 /src/librustdoc/html/static/js/main.js
parentdca3f1b786efd27be3b325ed1e01e247aa589c3b (diff)
downloadrust-aa17e1c47f8f3598f219b3ccc4d44fd423f98e60.tar.gz
rust-aa17e1c47f8f3598f219b3ccc4d44fd423f98e60.zip
Fix missing bottom border for headings in sidebar
Diffstat (limited to 'src/librustdoc/html/static/js/main.js')
-rw-r--r--src/librustdoc/html/static/js/main.js9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/librustdoc/html/static/js/main.js b/src/librustdoc/html/static/js/main.js
index c421c6e9dc1..4b55a0a69b6 100644
--- a/src/librustdoc/html/static/js/main.js
+++ b/src/librustdoc/html/static/js/main.js
@@ -566,6 +566,7 @@ function hideThemeButtonState() {
     // delayed sidebar rendering.
     window.initSidebarItems = function(items) {
         var sidebar = document.getElementsByClassName("sidebar-elems")[0];
+        var others;
         var current = window.sidebarCurrent;
 
         function addSidebarCrates(crates) {
@@ -594,7 +595,7 @@ function hideThemeButtonState() {
                 li.appendChild(link);
                 ul.appendChild(li);
             }
-            sidebar.appendChild(div);
+            others.appendChild(div);
         }
 
         function block(shortty, longty) {
@@ -635,10 +636,14 @@ function hideThemeButtonState() {
                 ul.appendChild(li);
             }
             div.appendChild(ul);
-            sidebar.appendChild(div);
+            others.appendChild(div);
         }
 
         if (sidebar) {
+            others = document.createElement("div");
+            others.className = "others";
+            sidebar.appendChild(others);
+
             var isModule = hasClass(document.body, "mod");
             if (!isModule) {
                 block("primitive", "Primitive Types");