]> git.proxmox.com Git - rustc.git/blame - src/tools/rustfmt/tests/source/control-brace-style-always-next-line.rs
New upstream version 1.52.1+dfsg1
[rustc.git] / src / tools / rustfmt / tests / source / control-brace-style-always-next-line.rs
CommitLineData
f20569fa
XL
1// rustfmt-control_brace_style: AlwaysNextLine
2
3fn main() {
4 loop {
5 ();
6 ();
7 }
8
9
10 'label: loop // loop comment
11 {
12 ();
13 }
14
15
16 cond = true;
17 while cond {
18 ();
19 }
20
21
22 'while_label: while cond { // while comment
23 ();
24 }
25
26
27 for obj in iter {
28 for sub_obj in obj
29 {
30 'nested_while_label: while cond {
31 ();
32 }
33 }
34 }
35
36 match some_var { // match comment
37 pattern0 => val0,
38 pattern1 => val1,
39 pattern2 | pattern3 => {
40 do_stuff();
41 val2
42 },
43 };
44}