]> git.lizzy.rs Git - rust.git/blob - src/tools/rustfmt/tests/target/issue-1096.rs
Merge commit '39683d8eb7a32a74bea96ecbf1e87675d3338506' into sync_cg_gcc-2022-03-26
[rust.git] / src / tools / rustfmt / tests / target / issue-1096.rs
1 struct StructA<T> /* comment 1 */ {
2     t: T,
3 }
4
5 struct StructB<T> /* comment 2 */;
6
7 struct StructC /* comment 3 */;
8
9 struct StructD /* comment 4 */ {
10     t: usize,
11 }
12
13 struct StructE<T>
14 /* comment 5 */
15 where
16     T: Clone,
17 {
18     t: usize,
19 }
20
21 struct StructF
22 /* comment 6 */
23 where
24     T: Clone,
25 {
26     t: usize,
27 }
28
29 struct StructG<T>
30 /* comment 7 */
31 // why a line comment??
32 {
33     t: T,
34 }
35
36 struct StructH<T>
37 /* comment 8 */
38 // why a line comment??
39 where
40     T: Clone,
41 {
42     t: T,
43 }
44
45 enum EnumA<T> /* comment 8 */ {
46     Field(T),
47 }
48
49 enum EnumB /* comment 9 */ {
50     Field,
51 }
52
53 // Issue 2781
54 struct StructX1<T>
55 // where
56 //     T: Clone
57 {
58     inner: String,
59 }
60
61 struct StructX2<
62     T,
63     U: Iterator<Item = String>,
64     V: Iterator<Item = String>,
65     W: Iterator<Item = String>,
66 >
67 // where
68 //     T: Clone
69 {
70     inner: String,
71 }