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