]> git.lizzy.rs Git - rust.git/blob - src/tools/rustfmt/tests/target/issue-4120.rs
Add 'src/tools/rustfmt/' from commit '7872306edf2e11a69aaffb9434088fd66b46a863'
[rust.git] / src / tools / rustfmt / tests / target / issue-4120.rs
1 fn main() {
2     let x = if true {
3         1
4         // In if
5     } else {
6         0
7         // In else
8     };
9
10     let x = if true {
11         1
12         /* In if */
13     } else {
14         0
15         /* In else */
16     };
17
18     let z = if true {
19         if true {
20             1
21
22             // In if level 2
23         } else {
24             2
25         }
26     } else {
27         3
28     };
29
30     let a = if true {
31         1
32     // In if
33     } else {
34         0
35         // In else
36     };
37
38     let a = if true {
39         1
40
41     // In if
42     } else {
43         0
44         // In else
45     };
46
47     let b = if true {
48         1
49
50     // In if
51     } else {
52         0
53         // In else
54     };
55
56     let c = if true {
57         1
58
59         // In if
60     } else {
61         0
62         // In else
63     };
64     for i in 0..2 {
65         println!("Something");
66         // In for
67     }
68
69     for i in 0..2 {
70         println!("Something");
71         /* In for */
72     }
73
74     extern "C" {
75         fn first();
76
77         // In foreign mod
78     }
79
80     extern "C" {
81         fn first();
82
83         /* In foreign mod */
84     }
85 }