]> git.proxmox.com Git - rustc.git/blob - src/test/rustdoc/structfields.rs
Imported Upstream version 1.9.0+dfsg1
[rustc.git] / src / test / rustdoc / structfields.rs
1 // Copyright 2016 The Rust Project Developers. See the COPYRIGHT
2 // file at the top-level directory of this distribution and at
3 // http://rust-lang.org/COPYRIGHT.
4 //
5 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8 // option. This file may not be copied, modified, or distributed
9 // except according to those terms.
10
11 // @has structfields/struct.Foo.html
12 pub struct Foo {
13 // @has - //pre "pub a: ()"
14 pub a: (),
15 // @has - //pre "// some fields omitted"
16 // @!has - //pre "b: ()"
17 b: (),
18 // @!has - //pre "c: usize"
19 #[doc(hidden)]
20 c: usize,
21 // @has - //pre "pub d: usize"
22 pub d: usize,
23 }
24
25 // @has structfields/struct.Bar.html
26 pub struct Bar {
27 // @has - //pre "pub a: ()"
28 pub a: (),
29 // @!has - //pre "// some fields omitted"
30 }
31
32 // @has structfields/enum.Qux.html
33 pub enum Qux {
34 Quz {
35 // @has - //pre "a: ()"
36 a: (),
37 // @!has - //pre "b: ()"
38 #[doc(hidden)]
39 b: (),
40 // @has - //pre "c: usize"
41 c: usize,
42 // @has - //pre "// some fields omitted"
43 },
44 }