summaryrefslogtreecommitdiffstats
path: root/src/test/mir-opt/simplify_locals_removes_unused_discriminant_reads.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/mir-opt/simplify_locals_removes_unused_discriminant_reads.rs')
-rw-r--r--src/test/mir-opt/simplify_locals_removes_unused_discriminant_reads.rs14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/test/mir-opt/simplify_locals_removes_unused_discriminant_reads.rs b/src/test/mir-opt/simplify_locals_removes_unused_discriminant_reads.rs
new file mode 100644
index 000000000..d09bd92c4
--- /dev/null
+++ b/src/test/mir-opt/simplify_locals_removes_unused_discriminant_reads.rs
@@ -0,0 +1,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