]> git.lizzy.rs Git - rust.git/blob - tests/target/else-if-brace-style-closing-next-line.rs
Added option to configure if/else brace style
[rust.git] / tests / target / else-if-brace-style-closing-next-line.rs
1 // rustfmt-else_if_brace_style: ClosingNextLine
2
3 fn main() {
4     if false {
5         ();
6         ();
7     }
8
9     if false
10     // lone if comment
11     {
12         ();
13         ();
14     }
15
16
17     let a = if 0 > 1 {
18         unreachable!()
19     }
20     else {
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
39     // else-if-chain if comment
40     {
41         ();
42     }
43     else if false
44     // else-if-chain else-if comment
45     {
46         ();
47         ();
48     }
49     else
50     // else-if-chain else comment
51     {
52         ();
53         ();
54         ();
55     }
56 }