]> git.proxmox.com Git - rustc.git/blame - src/tools/rustfmt/tests/target/control-brace-style-always-next-line.rs
Update upstream source from tag 'upstream/1.52.1+dfsg1'
[rustc.git] / src / tools / rustfmt / tests / target / 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
11 // loop comment
12 {
13 ();
14 }
15
16 cond = true;
17 while cond
18 {
19 ();
20 }
21
22 'while_label: while cond
23 {
24 // while comment
25 ();
26 }
27
28 for obj in iter
29 {
30 for sub_obj in obj
31 {
32 'nested_while_label: while cond
33 {
34 ();
35 }
36 }
37 }
38
39 match some_var
40 {
41 // match comment
42 pattern0 => val0,
43 pattern1 => val1,
44 pattern2 | pattern3 =>
45 {
46 do_stuff();
47 val2
48 }
49 };
50}