]> git.lizzy.rs Git - rust.git/blob - src/test/rustdoc-ui/coverage/json.rs
Update rustdoc coverage UI test
[rust.git] / src / test / rustdoc-ui / coverage / json.rs
1 // check-pass
2 // compile-flags:-Z unstable-options --output-format json --show-coverage
3
4 pub mod foo {
5     /// Hello!
6     pub struct Foo;
7     /// Bar
8     pub enum Bar { A }
9 }
10
11 /// X
12 pub struct X;
13
14 /// Bar
15 ///
16 /// ```
17 /// let x = 12;
18 /// ```
19 pub mod bar {
20     /// bar
21     pub struct Bar;
22     /// X
23     pub enum X {
24         /// ```
25         /// let x = "should be ignored!";
26         /// ```
27         Y
28     }
29 }
30
31 /// yolo
32 ///
33 /// ```text
34 /// should not be counted as a code example!
35 /// ```
36 pub enum Yolo { X }
37
38 impl Yolo {
39     /// ```
40     /// let x = "should be ignored!";
41     /// ```
42     pub const Const: u32 = 0;
43 }
44
45 pub struct Xo<T: Clone> {
46     /// ```
47     /// let x = "should be ignored!";
48     /// ```
49     x: T,
50 }
51
52 /// ```
53 /// let x = "should be ignored!";
54 /// ```
55 pub static StaticFoo: u32 = 0;
56
57 /// ```
58 /// let x = "should be ignored!";
59 /// ```
60 pub const ConstFoo: u32 = 0;
61
62 /// ```
63 /// let x = "should be ignored!";
64 /// ```
65 pub type TypeFoo = u32;