]> git.lizzy.rs Git - rust.git/blob - tests/source/else-if-brace-style-always-same-line.rs
Support @generated marker to skip code formatting
[rust.git] / tests / source / else-if-brace-style-always-same-line.rs
1 fn main() {
2     if false
3     {
4         ();
5         ();
6     }
7
8     if false // lone if comment
9     {
10         ();
11         ();
12     }
13
14
15     let a =
16         if 0 > 1 {
17             unreachable!()
18         }
19         else
20         {
21             0x0
22         };
23
24
25     if true
26     {
27         ();
28     } else if false {
29         ();
30         ();
31     }
32     else {
33         ();
34         ();
35         ();
36     }
37
38     if true // else-if-chain if comment
39     {
40         ();
41     }
42     else if false // else-if-chain else-if comment
43     {
44         ();
45         ();
46     } else // else-if-chain else comment
47     {
48         ();
49         ();
50         ();
51     }
52 }