rust/tests/mir-opt/simplify_locals_removes_unused_discriminant_reads.rs
2023-01-11 09:32:08 +00:00

15 lines
303 B
Rust

// 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