mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-28 11:07:42 +00:00
Rollup merge of #79300 - GuillaumeGomez:hidden-feature-info, r=jyn514
Prevent feature information to be hidden if it's on the impl directly Fixes #79279. So when a `#[doc(cfg...)]` is used on a trait impl directly, it's not hidden by the toggle.  r? `@jyn514`
This commit is contained in:
commit
70a839fd8f
@ -2332,12 +2332,18 @@ function defocusSearchBar() {
|
|||||||
var dontApplyBlockRule = toggle.parentNode.parentNode.id !== "main";
|
var dontApplyBlockRule = toggle.parentNode.parentNode.id !== "main";
|
||||||
if (action === "show") {
|
if (action === "show") {
|
||||||
removeClass(relatedDoc, "fns-now-collapsed");
|
removeClass(relatedDoc, "fns-now-collapsed");
|
||||||
removeClass(docblock, "hidden-by-usual-hider");
|
// Stability information is never hidden.
|
||||||
|
if (hasClass(docblock, "stability") === false) {
|
||||||
|
removeClass(docblock, "hidden-by-usual-hider");
|
||||||
|
}
|
||||||
onEachLazy(toggle.childNodes, adjustToggle(false, dontApplyBlockRule));
|
onEachLazy(toggle.childNodes, adjustToggle(false, dontApplyBlockRule));
|
||||||
onEachLazy(relatedDoc.childNodes, implHider(false, dontApplyBlockRule));
|
onEachLazy(relatedDoc.childNodes, implHider(false, dontApplyBlockRule));
|
||||||
} else if (action === "hide") {
|
} else if (action === "hide") {
|
||||||
addClass(relatedDoc, "fns-now-collapsed");
|
addClass(relatedDoc, "fns-now-collapsed");
|
||||||
addClass(docblock, "hidden-by-usual-hider");
|
// Stability information should be shown even when detailed info is hidden.
|
||||||
|
if (hasClass(docblock, "stability") === false) {
|
||||||
|
addClass(docblock, "hidden-by-usual-hider");
|
||||||
|
}
|
||||||
onEachLazy(toggle.childNodes, adjustToggle(true, dontApplyBlockRule));
|
onEachLazy(toggle.childNodes, adjustToggle(true, dontApplyBlockRule));
|
||||||
onEachLazy(relatedDoc.childNodes, implHider(true, dontApplyBlockRule));
|
onEachLazy(relatedDoc.childNodes, implHider(true, dontApplyBlockRule));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user