]> git.lizzy.rs Git - rust.git/blob - src/tools/rustfmt/tests/target/fn_args_indent-block.rs
:arrow_up: rust-analyzer
[rust.git] / src / tools / rustfmt / tests / target / fn_args_indent-block.rs
1 // rustfmt-normalize_comments: true
2
3 fn foo() {
4     foo();
5 }
6
7 fn foo(a: Aaaaaaaaaaaaaa, b: Bbbbbbbbbbbbbb) {
8     foo();
9 }
10
11 fn bar(
12     a: Aaaaaaaaaaaaaa,
13     b: Bbbbbbbbbbbbbb,
14     c: Cccccccccccccccccc,
15     d: Dddddddddddddddd,
16     e: Eeeeeeeeeeeeeee,
17 ) {
18     bar();
19 }
20
21 fn foo(a: Aaaaaaaaaaaaaa, b: Bbbbbbbbbbbbbb) -> String {
22     foo();
23 }
24
25 fn bar(
26     a: Aaaaaaaaaaaaaa,
27     b: Bbbbbbbbbbbbbb,
28     c: Cccccccccccccccccc,
29     d: Dddddddddddddddd,
30     e: Eeeeeeeeeeeeeee,
31 ) -> String {
32     bar();
33 }
34
35 fn foo(a: u8 /* Comment 1 */, b: u8 /* Comment 2 */) -> u8 {
36     bar()
37 }
38
39 fn foo(
40     a: u8, // Comment 1
41     b: Bbbbbbbbbbbbbb,
42     c: Cccccccccccccccccc,
43     d: Dddddddddddddddd,
44     e: Eeeeeeeeeeeeeee, // Comment 2
45 ) -> u8 {
46     bar()
47 }
48
49 fn bar(
50     a: Aaaaaaaaaaaaaa,
51     b: Bbbbbbbbbbbbbb,
52     c: Cccccccccccccccccc,
53     d: Dddddddddddddddd,
54     e: Eeeeeeeeeeeeeee,
55 ) -> String
56 where
57     X: Fooooo,
58     Y: Baaar,
59 {
60     bar();
61 }
62
63 fn foo() -> T {
64     foo();
65 }
66
67 fn foo() -> T
68 where
69     X: Foooo,
70     Y: Baaar,
71 {
72     foo();
73 }
74
75 fn foo()
76 where
77     X: Foooo,
78 {
79 }
80
81 fn foo()
82 where
83     X: Foooo,
84     Y: Baaar,
85 {
86 }
87
88 fn foo() -> (
89     Loooooooooooooooooooooong,
90     Reeeeeeeeeeeeeeeeeeeeeeeeturn,
91     iiiiiiiiis,
92     Looooooooooooooooong,
93 ) {
94     foo();
95 }
96
97 fn foo<g: G>() {
98     foo();
99 }
100
101 fn foo<
102     L: Loooooooooooooooooooooong,
103     G: Geeeeeeeeeeeneric,
104     I: iiiiiiiiis,
105     L: Looooooooooooooooong,
106 >() {
107     foo();
108 }
109
110 fn foo<L: Loooooooooooooooooooong, G: Geeeeeeeeeeneric, I: iiiiiiiiis, L: Loooooooooooooooong>() {
111     foo();
112 }
113
114 trait Test {
115     fn foo(a: u8) {}
116
117     fn bar(
118         a: Aaaaaaaaaaaaaa,
119         b: Bbbbbbbbbbbbbb,
120         c: Cccccccccccccccccc,
121         d: Dddddddddddddddd,
122         e: Eeeeeeeeeeeeeee,
123     ) -> String {
124     }
125 }
126
127 fn foo<L: Loooooooooooooooooooong, G: Geeeeeeeeeeneric, I: iiiiiiiiis, L: Loooooooooooooooong>(
128     a: Aaaaaaaaaaaaaaaaaaaa,
129     b: Bbbbbbbbbbbbbbbbb,
130     c: Cccccccccccccccccc,
131     d: Dddddddddddddddd,
132 ) {
133     foo();
134 }
135
136 fn foo() -> (
137     Looooooooooooooooooooooooooong,
138     Reeeeeeeeeeeeeeeeeeeeeeeeeeeeeturn,
139     iiiiiiiiiiiiiis,
140     Loooooooooooooooooooooong,
141 ) {
142     foo();
143 }