diff options
| author | Guillaume Gomez <guillaume.gomez@huawei.com> | 2021-09-06 16:27:09 +0200 |
|---|---|---|
| committer | Guillaume Gomez <guillaume.gomez@huawei.com> | 2021-09-10 10:49:42 +0200 |
| commit | eda4cfb13268e6344139dcbf57ef36962d9dc12d (patch) | |
| tree | 01a10525b72aee976f3c9c09f0b9f22bf443d096 /src/test/rustdoc-ui/coverage/enum-tuple.rs | |
| parent | 64344cce14f835f4f670d2aac9bd63cf520cc4f9 (diff) | |
| download | rust-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.rs')
| -rw-r--r-- | src/test/rustdoc-ui/coverage/enum-tuple.rs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/test/rustdoc-ui/coverage/enum-tuple.rs b/src/test/rustdoc-ui/coverage/enum-tuple.rs new file mode 100644 index 00000000000..5fb20545075 --- /dev/null +++ b/src/test/rustdoc-ui/coverage/enum-tuple.rs @@ -0,0 +1,18 @@ +// compile-flags:-Z unstable-options --show-coverage +// check-pass + +//! (remember the crate root is still a module) + +/// so check out this enum here +pub enum ThisEnum { + /// No need to document the field if there is only one in a tuple variant! + VarOne(String), + /// But if there is more than one... still fine! + VarTwo(String, String), +} + +/// Struct. +pub struct ThisStruct(u32); + +/// Struct. +pub struct ThisStruct2(u32, u8); |
