]> git.lizzy.rs Git - rust.git/blob - tests/source/fn-custom-7.rs
Unify a bunch of option types into IndentStyle
[rust.git] / tests / source / fn-custom-7.rs
1 // rustfmt-normalize_comments: true
2 // rustfmt-fn_args_layout: Block
3 // rustfmt-fn_args_density: Vertical
4 // rustfmt-fn_arg_indent: Block
5 // rustfmt-fn_brace_style: AlwaysNextLine
6
7 // Case with only one variable.
8 fn foo(a: u8) -> u8 {
9     bar()
10 }
11
12 // Case with 2 variables and some pre-comments.
13 fn foo(a: u8 /* Comment 1 */, b: u8 /* Comment 2 */) -> u8 {
14     bar()
15 }
16
17 // Case with 2 variables and some post-comments.
18 fn foo(/* Comment 1 */ a: u8, /* Comment 2 */ b: u8) -> u8 {
19     bar()
20 }
21
22 trait Test {
23     fn foo(a: u8) {}
24
25     fn bar(a: u8) -> String {}
26 }