]> git.lizzy.rs Git - rust.git/blob - src/tools/rustfmt/tests/target/fn-custom-7.rs
Merge commit 'd9ddce8a223cb9916389c039777b6966ea448dc8' into clippyup
[rust.git] / src / tools / rustfmt / tests / target / fn-custom-7.rs
1 // rustfmt-normalize_comments: true
2 // rustfmt-fn_args_layout: Vertical
3 // rustfmt-brace_style: AlwaysNextLine
4
5 // Case with only one variable.
6 fn foo(a: u8) -> u8
7 {
8     bar()
9 }
10
11 // Case with 2 variables and some pre-comments.
12 fn foo(
13     a: u8, // Comment 1
14     b: u8, // Comment 2
15 ) -> u8
16 {
17     bar()
18 }
19
20 // Case with 2 variables and some post-comments.
21 fn foo(
22     // Comment 1
23     a: u8,
24     // Comment 2
25     b: u8,
26 ) -> u8
27 {
28     bar()
29 }
30
31 trait Test
32 {
33     fn foo(a: u8) {}
34
35     fn bar(a: u8) -> String {}
36 }