]> git.lizzy.rs Git - rust.git/blob - tests/target/fn-custom-7.rs
Use trailing commas if block formatting fn args
[rust.git] / tests / target / fn-custom-7.rs
1 // rustfmt-normalize_comments: true
2 // rustfmt-fn_args_layout: BlockAlways
3 // rustfmt-fn_args_density: Vertical
4 // rustfmt-fn_arg_indent: Tabbed
5 // rustfmt-fn_brace_style: AlwaysNextLine
6
7 // Case with only one variable.
8 fn foo(
9     a: u8,
10 ) -> u8
11 {
12     bar()
13 }
14
15 // Case with 2 variables and some pre-comments.
16 fn foo(
17     a: u8, // Comment 1
18     b: u8, // Comment 2
19 ) -> u8
20 {
21     bar()
22 }
23
24 // Case with 2 variables and some post-comments.
25 fn foo(
26     // Comment 1
27     a: u8,
28     // Comment 2
29     b: u8,
30 ) -> u8
31 {
32     bar()
33 }
34
35 trait Test {
36     fn foo(
37         a: u8,
38     )
39     {
40     }
41
42     fn bar(
43         a: u8,
44     ) -> String
45     {
46     }
47 }