about summary refs log tree commit diff
diff options
context:
space:
mode:
authorArpad Borsos <swatinem@swatinem.de>2021-04-19 22:59:23 +0200
committerArpad Borsos <swatinem@swatinem.de>2021-04-23 18:13:06 +0200
commit85879fe83d72b46044517d390c98d2b0d942de15 (patch)
tree81ef87a6d761daeb02628a51f9cf79b4220f4c98
parent9f8eeca3bfaf8efa55c9ab9afa22b6a9896a9063 (diff)
downloadrust-85879fe83d72b46044517d390c98d2b0d942de15.tar.gz
rust-85879fe83d72b46044517d390c98d2b0d942de15.zip
improve wording
-rw-r--r--src/librustdoc/html/static/main.js2
-rw-r--r--src/test/rustdoc-gui/lib.rs8
2 files changed, 8 insertions, 2 deletions
diff --git a/src/librustdoc/html/static/main.js b/src/librustdoc/html/static/main.js
index ab341a647a8..164c504fd7f 100644
--- a/src/librustdoc/html/static/main.js
+++ b/src/librustdoc/html/static/main.js
@@ -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);
             }
         }
diff --git a/src/test/rustdoc-gui/lib.rs b/src/test/rustdoc-gui/lib.rs
index c1e161e1235..eeba3e3f907 100644
--- a/src/test/rustdoc-gui/lib.rs
+++ b/src/test/rustdoc-gui/lib.rs
@@ -29,7 +29,9 @@ pub struct 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 },
+}