]> git.lizzy.rs Git - rust.git/blob - tests/target/structs.rs
Merge pull request #84 from marcusklaas/tests
[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 }
14
15 struct Bar;
16
17 // With a where clause and generics.
18 pub struct Foo<'a, Y: Baz>
19     where X: Whatever
20 {
21     f: SomeType, // Comment beside a field
22 }
23
24 struct Baz {
25     a: A, // Comment A
26     b: B, // Comment B
27     c: C, // Comment C
28 }
29
30 struct Baz {
31     // Comment A
32     a: A,
33     // Comment B
34     b: B,
35     // Comment C
36     c: C,
37 }