Skip to content

Commit 85879fe

Browse files
committed
improve wording
1 parent 9f8eeca commit 85879fe

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

src/librustdoc/html/static/main.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,7 @@ function hideThemeButtonState() {
451451
// The element is not visible, we need to make it appear!
452452
collapseDocs(collapses[0], "show");
453453
}
454-
// In case this is a sub-variant, toggle the <details> open.
454+
// Open all ancestor <details> to make this element visible.
455455
openParentDetails(h3.parentNode);
456456
}
457457
}

src/test/rustdoc-gui/lib.rs

+7-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,9 @@ pub struct Foo;
2929

3030
impl Foo {
3131
#[must_use]
32-
pub fn must_use(&self) -> bool { true }
32+
pub fn must_use(&self) -> bool {
33+
true
34+
}
3335
}
3436

3537
/// Just a normal enum.
@@ -85,3 +87,7 @@ pub trait AnotherOne {
8587
/// let x = 12;
8688
/// ```
8789
pub fn check_list_code_block() {}
90+
91+
pub enum AnEnum {
92+
WithVariants { and: usize, sub: usize, variants: usize },
93+
}

0 commit comments

Comments
 (0)