]> git.lizzy.rs Git - rust.git/blob - tests/source/fn-custom-7.rs
Merge pull request #921 from matklad/more-unification
[rust.git] / tests / source / fn-custom-7.rs
1 // rustfmt-fn_args_layout: BlockAlways
2 // rustfmt-fn_args_density: Vertical
3 // rustfmt-fn_arg_indent: Tabbed
4 // rustfmt-fn_brace_style: AlwaysNextLine
5
6 // Case with only one variable.
7 fn foo(a: u8) -> u8 {
8     bar()
9 }
10
11 // Case with 2 variables and some pre-comments.
12 fn foo(a: u8 /* Comment 1 */, b: u8 /* Comment 2 */) -> u8 {
13     bar()
14 }
15
16 // Case with 2 variables and some post-comments.
17 fn foo(/* Comment 1 */ a: u8, /* Comment 2 */ b: u8) -> u8 {
18     bar()
19 }
20
21 trait Test {
22     fn foo(a: u8) {}
23
24     fn bar(a: u8) -> String {}
25 }