Skip to content

Commit 28a94a3

Browse files
Prevent feature information to be hidden if it's on the impl directly
1 parent 29a74e6 commit 28a94a3

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/librustdoc/html/static/main.js

+8-2
Original file line numberDiff line numberDiff line change
@@ -2332,12 +2332,18 @@ function defocusSearchBar() {
23322332
var dontApplyBlockRule = toggle.parentNode.parentNode.id !== "main";
23332333
if (action === "show") {
23342334
removeClass(relatedDoc, "fns-now-collapsed");
2335-
removeClass(docblock, "hidden-by-usual-hider");
2335+
// Stability information is never hidden.
2336+
if (hasClass(docblock, "stability") === false) {
2337+
removeClass(docblock, "hidden-by-usual-hider");
2338+
}
23362339
onEachLazy(toggle.childNodes, adjustToggle(false, dontApplyBlockRule));
23372340
onEachLazy(relatedDoc.childNodes, implHider(false, dontApplyBlockRule));
23382341
} else if (action === "hide") {
23392342
addClass(relatedDoc, "fns-now-collapsed");
2340-
addClass(docblock, "hidden-by-usual-hider");
2343+
// Stability information should be shown even when detailed info is hidden.
2344+
if (hasClass(docblock, "stability") === false) {
2345+
addClass(docblock, "hidden-by-usual-hider");
2346+
}
23412347
onEachLazy(toggle.childNodes, adjustToggle(true, dontApplyBlockRule));
23422348
onEachLazy(relatedDoc.childNodes, implHider(true, dontApplyBlockRule));
23432349
}

0 commit comments

Comments
 (0)