]> git.lizzy.rs Git - rust.git/commitdiff
improve wording
authorArpad Borsos <swatinem@swatinem.de>
Mon, 19 Apr 2021 20:59:23 +0000 (22:59 +0200)
committerArpad Borsos <swatinem@swatinem.de>
Fri, 23 Apr 2021 16:13:06 +0000 (18:13 +0200)
src/librustdoc/html/static/main.js
src/test/rustdoc-gui/lib.rs

index ab341a647a820bce5e0dc32a680fb68c87d2eea8..164c504fd7fba55b172f5918f02c1bde6d39ae78 100644 (file)
@@ -451,7 +451,7 @@ function hideThemeButtonState() {
                     // The element is not visible, we need to make it appear!
                     collapseDocs(collapses[0], "show");
                 }
-                // In case this is a sub-variant, toggle the <details> open.
+                // Open all ancestor <details> to make this element visible.
                 openParentDetails(h3.parentNode);
             }
         }
index c1e161e123588cdbe22622be63152f55d5297ef8..eeba3e3f9070df5b75ea8ff101f5fd106c64c4be 100644 (file)
@@ -29,7 +29,9 @@ pub fn foo() {}
 
 impl Foo {
     #[must_use]
-    pub fn must_use(&self) -> bool { true }
+    pub fn must_use(&self) -> bool {
+        true
+    }
 }
 
 /// Just a normal enum.
@@ -85,3 +87,7 @@ pub trait AnotherOne {
 /// let x = 12;
 /// ```
 pub fn check_list_code_block() {}
+
+pub enum AnEnum {
+    WithVariants { and: usize, sub: usize, variants: usize },
+}