]> git.lizzy.rs Git - rust.git/blob - tests/target/else-if-brace-style-always-next-line.rs
Fix bug in identifying comments
[rust.git] / tests / target / else-if-brace-style-always-next-line.rs
1 // rustfmt-single_line_if_else_max_width: 0
2 // rustfmt-control_brace_style: AlwaysNextLine
3
4 fn main() {
5     if false
6     {
7         ();
8         ();
9     }
10
11     if false
12     // lone if comment
13     {
14         ();
15         ();
16     }
17
18
19     let a = if 0 > 1
20     {
21         unreachable!()
22     }
23     else
24     {
25         0x0
26     };
27
28
29     if true
30     {
31         ();
32     }
33     else if false
34     {
35         ();
36         ();
37     }
38     else
39     {
40         ();
41         ();
42         ();
43     }
44
45     if true
46     // else-if-chain if comment
47     {
48         ();
49     }
50     else if false
51     // else-if-chain else-if comment
52     {
53         ();
54         ();
55     }
56     else
57     // else-if-chain else comment
58     {
59         ();
60         ();
61         ();
62     }
63 }