Skip to content

Commit bfe49a0

Browse files
Rollup merge of #79796 - GuillaumeGomez:hide-associated-const-when-collapsing, r=jyn514
Hide associated constants too when collapsing implementation Fixes #71849. r? `@jyn514`
2 parents 275599d + 99df340 commit bfe49a0

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/librustdoc/html/static/main.js

+6-3
Original file line numberDiff line numberDiff line change
@@ -2274,9 +2274,12 @@ function defocusSearchBar() {
22742274

22752275
function implHider(addOrRemove, fullHide) {
22762276
return function(n) {
2277-
var is_method = hasClass(n, "method") || fullHide;
2278-
if (is_method || hasClass(n, "type")) {
2279-
if (is_method === true) {
2277+
var shouldHide =
2278+
fullHide === true ||
2279+
hasClass(n, "method") === true ||
2280+
hasClass(n, "associatedconstant") === true;
2281+
if (shouldHide === true || hasClass(n, "type") === true) {
2282+
if (shouldHide === true) {
22802283
if (addOrRemove) {
22812284
addClass(n, "hidden-by-impl-hider");
22822285
} else {

0 commit comments

Comments
 (0)