]> git.proxmox.com Git - rustc.git/blame - src/tools/rustfmt/tests/target/fn-custom-7.rs
New upstream version 1.52.1+dfsg1
[rustc.git] / src / tools / rustfmt / tests / target / fn-custom-7.rs
CommitLineData
f20569fa
XL
1// rustfmt-normalize_comments: true
2// rustfmt-fn_args_layout: Vertical
3// rustfmt-brace_style: AlwaysNextLine
4
5// Case with only one variable.
6fn foo(a: u8) -> u8
7{
8 bar()
9}
10
11// Case with 2 variables and some pre-comments.
12fn 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.
21fn foo(
22 // Comment 1
23 a: u8,
24 // Comment 2
25 b: u8,
26) -> u8
27{
28 bar()
29}
30
31trait Test
32{
33 fn foo(a: u8) {}
34
35 fn bar(a: u8) -> String {}
36}