"keyword",
"existential",
"attr",
- "derive"];
+ "derive",
+ "traitalias"];
var search_input = document.getElementsByClassName("search-input")[0];
}
function browserSupportsHistoryApi() {
- return document.location.protocol != "file:" &&
- window.history && typeof window.history.pushState === "function";
+ return window.history && typeof window.history.pushState === "function";
}
var main = document.getElementById("main");
block("type", "Type Definitions");
block("foreigntype", "Foreign Types");
block("keyword", "Keywords");
+ block("traitalias", "Trait Aliases");
}
window.initSidebarItems = initSidebarItems;
updateLocalStorage("rustdoc-collapse", "true");
addClass(innerToggle, "will-expand");
onEveryMatchingChild(innerToggle, "inner", function(e) {
- e.innerHTML = labelForToggleButton(true);
+ var parent = e.parentNode;
+ var superParent = null;
+
+ if (parent) {
+ superParent = parent.parentNode;
+ }
+ if (!parent || !superParent || superParent.id !== "main" ||
+ hasClass(parent, "impl") === false) {
+ e.innerHTML = labelForToggleButton(true);
+ }
});
innerToggle.title = "expand all docs";
if (fromAutoCollapse !== true) {
onEachLazy(document.getElementsByClassName("collapse-toggle"), function(e) {
- collapseDocs(e, "hide", pageId);
+ var parent = e.parentNode;
+ var superParent = null;
+
+ if (parent) {
+ superParent = parent.parentNode;
+ }
+ if (!parent || !superParent || superParent.id !== "main" ||
+ hasClass(parent, "impl") === false) {
+ collapseDocs(e, "hide", pageId);
+ }
});
}
}
} else if (action === "hide") {
addClass(relatedDoc, "fns-now-collapsed");
addClass(docblock, "hidden-by-usual-hider");
- onEachLazy(toggle.childNodes, adjustToggle(true, dontApplyBlockRule);
+ onEachLazy(toggle.childNodes, adjustToggle(true, dontApplyBlockRule));
onEachLazy(relatedDoc.childNodes, implHider(true, dontApplyBlockRule));
}
}