about summary refs log tree commit diff
path: root/tests/mir-opt/const_prop/mutable_variable_aggregate.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/mir-opt/const_prop/mutable_variable_aggregate.rs')
-rw-r--r--tests/mir-opt/const_prop/mutable_variable_aggregate.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/mir-opt/const_prop/mutable_variable_aggregate.rs b/tests/mir-opt/const_prop/mutable_variable_aggregate.rs
new file mode 100644
index 00000000000..d4ff8d89073
--- /dev/null
+++ b/tests/mir-opt/const_prop/mutable_variable_aggregate.rs
@@ -0,0 +1,9 @@
+// unit-test
+// compile-flags: -O
+
+// EMIT_MIR mutable_variable_aggregate.main.ConstProp.diff
+fn main() {
+    let mut x = (42, 43);
+    x.1 = 99;
+    let y = x;
+}