summaryrefslogtreecommitdiffstats
path: root/src/test/mir-opt/simplify-locals-removes-unused-discriminant-reads.rs
blob: d09bd92c4e81d176328a1159f1c23aadd8c1e723 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// unit-test: SimplifyLocals

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.diff