about summary refs log tree commit diff
path: root/src/test/rustdoc-ui/coverage/enum-tuple-documented.rs
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume.gomez@huawei.com>2021-09-06 16:27:09 +0200
committerGuillaume Gomez <guillaume.gomez@huawei.com>2021-09-10 10:49:42 +0200
commiteda4cfb13268e6344139dcbf57ef36962d9dc12d (patch)
tree01a10525b72aee976f3c9c09f0b9f22bf443d096 /src/test/rustdoc-ui/coverage/enum-tuple-documented.rs
parent64344cce14f835f4f670d2aac9bd63cf520cc4f9 (diff)
downloadrust-eda4cfb13268e6344139dcbf57ef36962d9dc12d.tar.gz
rust-eda4cfb13268e6344139dcbf57ef36962d9dc12d.zip
Add test for enum tuple variants and tuple struct doc count
Diffstat (limited to 'src/test/rustdoc-ui/coverage/enum-tuple-documented.rs')
-rw-r--r--src/test/rustdoc-ui/coverage/enum-tuple-documented.rs37
1 files changed, 37 insertions, 0 deletions
diff --git a/src/test/rustdoc-ui/coverage/enum-tuple-documented.rs b/src/test/rustdoc-ui/coverage/enum-tuple-documented.rs
new file mode 100644
index 00000000000..e9c165b1916
--- /dev/null
+++ b/src/test/rustdoc-ui/coverage/enum-tuple-documented.rs
@@ -0,0 +1,37 @@
+// compile-flags:-Z unstable-options --show-coverage
+// check-pass
+
+// The point of this test is to ensure that the number of "documented" items
+// is higher than in `enum-tuple.rs`.
+
+//! (remember the crate root is still a module)
+
+/// so check out this enum here
+pub enum ThisEnum {
+    /// VarOne.
+    VarOne(
+        /// hello!
+        String,
+    ),
+    /// Var Two.
+    VarTwo(
+        /// Hello
+        String,
+        /// Bis repetita.
+        String,
+    ),
+}
+
+/// Struct.
+pub struct ThisStruct(
+    /// hello
+    u32,
+);
+
+/// Struct.
+pub struct ThisStruct2(
+    /// hello
+    u32,
+    /// Bis repetita.
+    u8,
+);