]> git.lizzy.rs Git - rust.git/blob - src/tools/rustfmt/tests/source/fn-custom-7.rs
Rollup merge of #107166 - petrochenkov:nooptable, r=oli-obk
[rust.git] / src / tools / rustfmt / tests / source / fn-custom-7.rs
1 // rustfmt-normalize_comments: true
2 // rustfmt-fn_params_layout: Vertical
3 // rustfmt-brace_style: AlwaysNextLine
4
5 // Case with only one variable.
6 fn foo(a: u8) -> u8 {
7     bar()
8 }
9
10 // Case with 2 variables and some pre-comments.
11 fn foo(a: u8 /* Comment 1 */, b: u8 /* Comment 2 */) -> u8 {
12     bar()
13 }
14
15 // Case with 2 variables and some post-comments.
16 fn foo(/* Comment 1 */ a: u8, /* Comment 2 */ b: u8) -> u8 {
17     bar()
18 }
19
20 trait Test {
21     fn foo(a: u8) {}
22
23     fn bar(a: u8) -> String {}
24 }