summaryrefslogtreecommitdiffstats
path: root/tests/mir-opt/building/custom/enums.switch_option.built.after.mir
blob: fa03f274be340e62e5945db41900f90ab711024e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// MIR for `switch_option` after built

fn switch_option(_1: Option<()>) -> bool {
    let mut _0: bool;
    let mut _2: isize;

    bb0: {
        _2 = discriminant(_1);
        switchInt(_2) -> [0: bb1, 1: bb2, otherwise: bb2];
    }

    bb1: {
        _0 = const false;
        return;
    }

    bb2: {
        _0 = const true;
        return;
    }
}