]> git.lizzy.rs Git - rust.git/blob - tests/target/issue-4909/wrap-comments-not-normalized.rs
Preserve normalized comments after last list item
[rust.git] / tests / target / issue-4909 / wrap-comments-not-normalized.rs
1 // rustfmt-wrap_comments: true
2
3 pub enum E {
4     // Expand as needed, numbers should be ascending according to the stage
5     // through the inclusion pipeline, or according to the descriptions
6     Variant1,
7     // Expand as needed, numbers should be ascending according to the stage
8     // through the inclusion pipeline, or according to the descriptions
9     Variant2,
10     // Expand as needed, numbers should be ascending according to the stage
11     // through the inclusion pipeline, or according to the descriptions
12 }
13
14 pub enum E2 {
15     // This can be changed once https://github.com/rust-lang/rustfmt/issues/4854 is fixed
16 // Expand as needed, numbers should be ascending according to the stage
17 // through the inclusion pipeline, or according to the descriptions
18 }
19
20 pub enum E3 {
21     // Expand as needed, numbers should be ascending according to the stage through the inclusion
22     // pipeline, or according to the descriptions
23     Variant1,
24     // Expand as needed, numbers should be ascending according to the stage through the inclusion
25     // pipeline, or according to the descriptions
26     Variant2,
27     // Expand as needed, numbers should be ascending according to the stage through the inclusion
28     // pipeline, or according to the descriptions
29 }
30
31 pub struct S {
32     // Expand as needed, numbers should be ascending according to the stage
33     // through the inclusion pipeline, or according to the descriptions
34     some_field: usize,
35     // Expand as needed, numbers should be ascending according to the stage
36     // through the inclusion pipeline, or according to the descriptions
37     last_field: usize,
38     // Expand as needed, numbers should be ascending according to the stage
39     // through the inclusion pipeline, or according to the descriptions
40 }
41
42 pub struct S2 {
43     // This can be changed once https://github.com/rust-lang/rustfmt/issues/4854 is fixed
44 // Expand as needed, numbers should be ascending according to the stage
45 // through the inclusion pipeline, or according to the descriptions
46 }
47
48 pub struct S3 {
49     // Expand as needed, numbers should be ascending according to the stage through the inclusion
50     // pipeline, or according to the descriptions
51     some_field: usize,
52     // Expand as needed, numbers should be ascending according to the stage through the inclusion
53     // pipeline, or according to the descriptions
54     last_field: usize,
55     // Expand as needed, numbers should be ascending according to the stage through the inclusion
56     // pipeline, or according to the descriptions
57 }
58
59 fn foo(
60     // Expand as needed, numbers should be ascending according to the stage
61     // through the inclusion pipeline, or according to the descriptions
62     a: usize,
63     // Expand as needed, numbers should be ascending according to the stage
64     // through the inclusion pipeline, or according to the descriptions
65     b: usize,
66     // Expand as needed, numbers should be ascending according to the stage
67     // through the inclusion pipeline, or according to the descriptions
68 ) -> usize {
69     5
70 }
71
72 fn foo2(// Expand as needed, numbers should be ascending according to the stage
73     // through the inclusion pipeline, or according to the descriptions
74 ) -> usize {
75     5
76 }
77
78 fn foo3(
79     // Expand as needed, numbers should be ascending according to the stage through the inclusion
80     // pipeline, or according to the descriptions
81     a: usize,
82     // Expand as needed, numbers should be ascending according to the stage through the inclusion
83     // pipeline, or according to the descriptions
84     b: usize,
85     // Expand as needed, numbers should be ascending according to the stage through the inclusion
86     // pipeline, or according to the descriptions
87 ) -> usize {
88     5
89 }
90
91 fn main() {
92     let v = vec![
93         // Expand as needed, numbers should be ascending according to the stage
94         // through the inclusion pipeline, or according to the descriptions
95         1,
96         // Expand as needed, numbers should be ascending according to the stage
97         // through the inclusion pipeline, or according to the descriptions
98         2,
99         // Expand as needed, numbers should be ascending according to the stage
100         // through the inclusion pipeline, or according to the descriptions
101     ];
102
103     let v2: Vec<i32> = vec![
104         // Expand as needed, numbers should be ascending according to the stage
105         // through the inclusion pipeline, or according to the descriptions
106     ];
107
108     let v3 = vec![
109         // Expand as needed, numbers should be ascending according to the stage through the
110         // inclusion pipeline, or according to the descriptions
111         1,
112         // Expand as needed, numbers should be ascending according to the stage through the
113         // inclusion pipeline, or according to the descriptions
114         2,
115         // Expand as needed, numbers should be ascending according to the stage through the
116         // inclusion pipeline, or according to the descriptions
117     ];
118 }