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