]> git.lizzy.rs Git - rust.git/blob - tests/rustdoc/structfields.rs
Rollup merge of #106407 - mejrs:attr_check, r=compiler-errors
[rust.git] / tests / rustdoc / structfields.rs
1 // @has structfields/struct.Foo.html
2 pub struct Foo {
3     // @has - //pre "pub a: ()"
4     pub a: (),
5     // @has - //pre "/* private fields */"
6     // @!has - //pre "b: ()"
7     b: (),
8     // @!has - //pre "c: usize"
9     #[doc(hidden)]
10     c: usize,
11     // @has - //pre "pub d: usize"
12     pub d: usize,
13 }
14
15 // @has structfields/struct.Bar.html
16 pub struct Bar {
17     // @has - //pre "pub a: ()"
18     pub a: (),
19     // @!has - //pre "/* private fields */"
20 }
21
22 // @has structfields/enum.Qux.html
23 pub enum Qux {
24     Quz {
25         // @has - //pre "a: ()"
26         a: (),
27         // @!has - //pre "b: ()"
28         #[doc(hidden)]
29         b: (),
30         // @has - //pre "c: usize"
31         c: usize,
32         // @has - //pre "/* private fields */"
33     },
34 }
35
36 // @has structfields/struct.Baz.html //pre "pub struct Baz { /* private fields */ }"
37 pub struct Baz {
38     x: u8,
39     #[doc(hidden)]
40     pub y: u8,
41 }
42
43 // @has structfields/struct.Quux.html //pre "pub struct Quux {}"
44 pub struct Quux {}