summaryrefslogtreecommitdiffstats
path: root/tests/mir-opt/simplify_locals_removes_unused_discriminant_reads.rs
blob: de65857412cfc7a422194a4956461295349b4c6f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// unit-test: SimplifyLocals-before-const-prop

fn map(x: Option<Box<()>>) -> Option<Box<()>> {
    match x {
        None => None,
        Some(x) => Some(x),
    }
}

fn main() {
    map(None);
}

// EMIT_MIR simplify_locals_removes_unused_discriminant_reads.map.SimplifyLocals-before-const-prop.diff