about summary refs log tree commit diff
path: root/tests/mir-opt/dataflow-const-prop/tuple.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/mir-opt/dataflow-const-prop/tuple.rs')
-rw-r--r--tests/mir-opt/dataflow-const-prop/tuple.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/mir-opt/dataflow-const-prop/tuple.rs b/tests/mir-opt/dataflow-const-prop/tuple.rs
new file mode 100644
index 00000000000..92c70eab0ff
--- /dev/null
+++ b/tests/mir-opt/dataflow-const-prop/tuple.rs
@@ -0,0 +1,9 @@
+// unit-test: DataflowConstProp
+
+// EMIT_MIR tuple.main.DataflowConstProp.diff
+fn main() {
+    let mut a = (1, 2);
+    let b = a.0 + a.1 + 3;
+    a = (2, 3);
+    let c = a.0 + a.1 + b;
+}