]> git.proxmox.com Git - rustc.git/blame - src/test/rustdoc/structfields.rs
New upstream version 1.34.2+dfsg1
[rustc.git] / src / test / rustdoc / structfields.rs
CommitLineData
9fa01778
XL
1// compile-flags:-Z unstable-options --generate-redirect-pages
2
9e0c209e
SL
3// @has structfields/Foo.t.html
4// @has - struct.Foo.html
54a0048b
SL
5// @has structfields/struct.Foo.html
6pub 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
9e0c209e
SL
19// @has structfields/Bar.t.html
20// @has - struct.Bar.html
54a0048b
SL
21// @has structfields/struct.Bar.html
22pub struct Bar {
23 // @has - //pre "pub a: ()"
24 pub a: (),
25 // @!has - //pre "// some fields omitted"
26}
27
9e0c209e
SL
28// @has structfields/Qux.t.html
29// @has - enum.Qux.html
54a0048b
SL
30// @has structfields/enum.Qux.html
31pub 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}
9e0c209e
SL
43
44// @has structfields/struct.Baz.html //pre "pub struct Baz { /* fields omitted */ }"
45pub struct Baz {
46 x: u8,
47 #[doc(hidden)]
48 pub y: u8,
49}
50
51// @has structfields/struct.Quux.html //pre "pub struct Quux {}"
52pub struct Quux {}