]> git.lizzy.rs Git - rust.git/blob - tests/target/fn_args_layout-block.rs
b2d30018abd48ae8594c4b15626cabc4a6c1ff8c
[rust.git] / tests / target / fn_args_layout-block.rs
1 // rustfmt-fn_args_layout: Block
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 X: Fooooo,
57           Y: Baaar
58 {
59     bar();
60 }
61
62 fn foo() -> T {
63     foo();
64 }
65
66 fn foo() -> T
67     where X: Foooo,
68           Y: Baaar
69 {
70     foo();
71 }
72
73 fn foo() where X: Foooo {}
74
75 fn foo()
76     where X: Foooo,
77           Y: Baaar
78 {
79 }
80
81 fn foo
82     ()
83     -> (Loooooooooooooooooooooong, Reeeeeeeeeeeeeeeeeeeeeeeeturn, iiiiiiiiis, Looooooooooooooooong)
84 {
85     foo();
86 }
87
88 fn foo<g: G>() {
89     foo();
90 }
91
92 fn foo<L: Loooooooooooooooooooooong, G: Geeeeeeeeeeeneric, I: iiiiiiiiis, L: Looooooooooooooooong>
93     () {
94     foo();
95 }
96
97 fn foo<L: Loooooooooooooooooooong, G: Geeeeeeeeeeneric, I: iiiiiiiiis, L: Loooooooooooooooong>() {
98     foo();
99 }
100
101 fn foo<L: Loooooooooooooooooooong, G: Geeeeeeeeeeneric, I: iiiiiiiiis, L: Loooooooooooooooong>(a: Aaaaaaaaaaaaaaaaaaaa, b: Bbbbbbbbbbbbbbbbb, c: Cccccccccccccccccc, d: Dddddddddddddddd) {
102     foo();
103 }
104
105 trait Test {
106     fn foo(a: u8) {}
107
108     fn bar(
109         a: Aaaaaaaaaaaaaa,
110         b: Bbbbbbbbbbbbbb,
111         c: Cccccccccccccccccc,
112         d: Dddddddddddddddd,
113         e: Eeeeeeeeeeeeeee
114     ) -> String {
115     }
116 }