summaryrefslogtreecommitdiffstats
path: root/tests/mir-opt/const_goto_storage.rs
blob: 459599c73eb9ccefabeef4d73f687fe2f97282ab (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// unit-test: ConstGoto

// EMIT_MIR const_goto_storage.match_nested_if.ConstGoto.diff
fn match_nested_if() -> bool {
    let val = match () {
        () if if if if true { true } else { false } { true } else { false } {
            true
        } else {
            false
        } =>
            {
                true
            }
        _ => false,
    };
    val
}

fn main() {
    let _ = match_nested_if();
}