diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:19:13 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:19:13 +0000 |
commit | 218caa410aa38c29984be31a5229b9fa717560ee (patch) | |
tree | c54bd55eeb6e4c508940a30e94c0032fbd45d677 /tests/rustdoc-ui/coverage/json.rs | |
parent | Releasing progress-linux version 1.67.1+dfsg1-1~progress7.99u1. (diff) | |
download | rustc-218caa410aa38c29984be31a5229b9fa717560ee.tar.xz rustc-218caa410aa38c29984be31a5229b9fa717560ee.zip |
Merging upstream version 1.68.2+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/rustdoc-ui/coverage/json.rs')
-rw-r--r-- | tests/rustdoc-ui/coverage/json.rs | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/tests/rustdoc-ui/coverage/json.rs b/tests/rustdoc-ui/coverage/json.rs new file mode 100644 index 000000000..a591cd5db --- /dev/null +++ b/tests/rustdoc-ui/coverage/json.rs @@ -0,0 +1,65 @@ +// check-pass +// compile-flags:-Z unstable-options --output-format json --show-coverage + +pub mod foo { + /// Hello! + pub struct Foo; + /// Bar + pub enum Bar { A } +} + +/// X +pub struct X; + +/// Bar +/// +/// ``` +/// let x = 12; +/// ``` +pub mod bar { + /// bar + pub struct Bar; + /// X + pub enum X { + /// ``` + /// let x = "should be ignored!"; + /// ``` + Y + } +} + +/// yolo +/// +/// ```text +/// should not be counted as a code example! +/// ``` +pub enum Yolo { X } + +impl Yolo { + /// ``` + /// let x = "should be ignored!"; + /// ``` + pub const Const: u32 = 0; +} + +pub struct Xo<T: Clone> { + /// ``` + /// let x = "should be ignored!"; + /// ``` + x: T, +} + +/// ``` +/// let x = "should be ignored!"; +/// ``` +pub static StaticFoo: u32 = 0; + +/// ``` +/// let x = "should be ignored!"; +/// ``` +pub const ConstFoo: u32 = 0; + +/// ``` +/// let x = "should be ignored!"; +/// ``` +pub type TypeFoo = u32; |