]> git.lizzy.rs Git - rust.git/blob - tests/target/structs.rs
Merge pull request #90 from marcusklaas/empty-imports
[rust.git] / tests / target / structs.rs
1
2 /// A Doc comment
3 #[AnAttribute]
4 pub struct Foo {
5     #[rustfmt_skip]
6     f :   SomeType, // Comment beside a field
7     f: SomeType, // Comment beside a field
8     // Comment on a field
9     #[AnAttribute]
10     g: SomeOtherType,
11     /// A doc comment on a field
12     h: AThirdType,
13     pub i: TypeForPublicField,
14 }
15
16 struct Bar;
17
18 // With a where clause and generics.
19 pub struct Foo<'a, Y: Baz>
20     where X: Whatever
21 {
22     f: SomeType, // Comment beside a field
23 }
24
25 struct Baz {
26     a: A, // Comment A
27     b: B, // Comment B
28     c: C, // Comment C
29 }
30
31 struct Baz {
32     // Comment A
33     a: A,
34     // Comment B
35     b: B,
36     // Comment C
37     c: C,
38 }