]> git.lizzy.rs Git - rust.git/blob - tests/target/else-if-brace-style-closing-next-line.rs
Replace various small width heuristics with a single option
[rust.git] / tests / target / else-if-brace-style-closing-next-line.rs
1 // rustfmt-control_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 { unreachable!() } else { 0x0 };
18
19
20     if true {
21         ();
22     }
23     else if false {
24         ();
25         ();
26     }
27     else {
28         ();
29         ();
30         ();
31     }
32
33     if true
34     // else-if-chain if comment
35     {
36         ();
37     }
38     else if false
39     // else-if-chain else-if comment
40     {
41         ();
42         ();
43     }
44     else
45     // else-if-chain else comment
46     {
47         ();
48         ();
49         ();
50     }
51 }