summaryrefslogtreecommitdiffstats
path: root/tests/mir-opt/derefer_terminator_test.rs
blob: 164aa733a246c7bd7f6b93bd7421ff9ea8cc4556 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// unit-test: Derefer
// EMIT_MIR derefer_terminator_test.main.Derefer.diff
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY

fn main() {
    let b = foo();
    let d = foo();
    match ****(&&&&b) {
        true => {let x = 5;},
        false => {}
    }
    let y = 42;
}

fn foo() -> bool {
    true
}