]> git.lizzy.rs Git - rust.git/blob - src/test/rustdoc/structfields.rs
Auto merge of #68661 - nnethercote:rm-unused-read_uleb128-param, r=Mark-Simulacrum
[rust.git] / src / test / rustdoc / structfields.rs
1 // compile-flags:-Z unstable-options --generate-redirect-pages
2
3 // @has structfields/Foo.t.html
4 // @has - struct.Foo.html
5 // @has structfields/struct.Foo.html
6 pub struct Foo {
7     // @has - //pre "pub a: ()"
8     pub a: (),
9     // @has - //pre "// some fields omitted"
10     // @!has - //pre "b: ()"
11     b: (),
12     // @!has - //pre "c: usize"
13     #[doc(hidden)]
14     c: usize,
15     // @has - //pre "pub d: usize"
16     pub d: usize,
17 }
18
19 // @has structfields/Bar.t.html
20 // @has - struct.Bar.html
21 // @has structfields/struct.Bar.html
22 pub struct Bar {
23     // @has - //pre "pub a: ()"
24     pub a: (),
25     // @!has - //pre "// some fields omitted"
26 }
27
28 // @has structfields/Qux.t.html
29 // @has - enum.Qux.html
30 // @has structfields/enum.Qux.html
31 pub enum Qux {
32     Quz {
33         // @has - //pre "a: ()"
34         a: (),
35         // @!has - //pre "b: ()"
36         #[doc(hidden)]
37         b: (),
38         // @has - //pre "c: usize"
39         c: usize,
40         // @has - //pre "// some fields omitted"
41     },
42 }
43
44 // @has structfields/struct.Baz.html //pre "pub struct Baz { /* fields omitted */ }"
45 pub struct Baz {
46     x: u8,
47     #[doc(hidden)]
48     pub y: u8,
49 }
50
51 // @has structfields/struct.Quux.html //pre "pub struct Quux {}"
52 pub struct Quux {}