]> git.lizzy.rs Git - rust.git/blob - src/tools/rustfmt/tests/target/issue-3198.rs
Merge commit '4bdfb0741dbcecd5279a2635c3280726db0604b5' into clippyup
[rust.git] / src / tools / rustfmt / tests / target / issue-3198.rs
1 impl TestTrait {
2     fn foo_one_pre(/* Important comment1 */ self) {}
3
4     fn foo_one_post(self /* Important comment1 */) {}
5
6     fn foo_pre(/* Important comment1 */ self, /* Important comment2 */ a: i32) {}
7
8     fn foo_post(self /* Important comment1 */, a: i32 /* Important comment2 */) {}
9
10     fn bar_pre(/* Important comment1 */ &mut self, /* Important comment2 */ a: i32) {}
11
12     fn bar_post(&mut self /* Important comment1 */, a: i32 /* Important comment2 */) {}
13
14     fn baz_pre(
15         /* Important comment1 */
16         self: X<'a, 'b>,
17         /* Important comment2 */
18         a: i32,
19     ) {
20     }
21
22     fn baz_post(
23         self: X<'a, 'b>, /* Important comment1 */
24         a: i32,          /* Important comment2 */
25     ) {
26     }
27
28     fn baz_tree_pre(
29         /* Important comment1 */
30         self: X<'a, 'b>,
31         /* Important comment2 */
32         a: i32,
33         /* Important comment3 */
34         b: i32,
35     ) {
36     }
37
38     fn baz_tree_post(
39         self: X<'a, 'b>, /* Important comment1 */
40         a: i32,          /* Important comment2 */
41         b: i32,          /* Important comment3 */
42     ) {
43     }
44
45     fn multi_line(
46         self: X<'a, 'b>, /* Important comment1-1 */
47         /* Important comment1-2 */
48         a: i32, /* Important comment2 */
49         b: i32, /* Important comment3 */
50     ) {
51     }
52
53     fn two_line_comment(
54         self: X<'a, 'b>, /* Important comment1-1
55                          Important comment1-2 */
56         a: i32, /* Important comment2 */
57         b: i32, /* Important comment3 */
58     ) {
59     }
60
61     fn no_first_line_comment(
62         self: X<'a, 'b>,
63         /* Important comment2 */ a: i32,
64         /* Important comment3 */ b: i32,
65     ) {
66     }
67 }