]> git.lizzy.rs Git - rust.git/blob - tests/target/else-if-brace-style-always-same-line.rs
Tidy up and pass tests
[rust.git] / tests / target / else-if-brace-style-always-same-line.rs
1 // rustfmt-control_brace_style: AlwaysSameLine
2
3 fn main() {
4     if false {
5         ();
6         ();
7     }
8
9     if false
10     // lone if comment
11     {
12         ();
13         ();
14     }
15
16     let a = if 0 > 1 { unreachable!() } else { 0x0 };
17
18     if true {
19         ();
20     } else if false {
21         ();
22         ();
23     } else {
24         ();
25         ();
26         ();
27     }
28
29     if true
30     // else-if-chain if comment
31     {
32         ();
33     } else if false
34     // else-if-chain else-if comment
35     {
36         ();
37         ();
38     } else
39     // else-if-chain else comment
40     {
41         ();
42         ();
43         ();
44     }
45 }