]> git.lizzy.rs Git - rust.git/blob - src/tools/rustfmt/tests/target/control-brace-style-always-same-line.rs
Auto merge of #85176 - a1phyr:impl_clone_from, r=yaahc
[rust.git] / src / tools / rustfmt / tests / target / control-brace-style-always-same-line.rs
1 fn 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 }