summaryrefslogtreecommitdiffstats
path: root/src/tools/rustfmt/tests/target/issue-3217.rs
blob: 5121320a0975b1e523ef025ccab9bf3109a2c0f5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#![feature(label_break_value)]

fn main() {
    let mut res = 0;
    's_39: {
        if res == 0i32 {
            println!("Hello, world!");
        }
    }
    's_40: loop {
        println!("res = {}", res);
        res += 1;
        if res == 3i32 {
            break 's_40;
        }
    }
    let toto = || {
        if true {
            42
        } else {
            24
        }
    };
}