summaryrefslogtreecommitdiffstats
path: root/src/test/mir-opt/const_prop/mutable_variable_aggregate_mut_ref.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/mir-opt/const_prop/mutable_variable_aggregate_mut_ref.rs')
-rw-r--r--src/test/mir-opt/const_prop/mutable_variable_aggregate_mut_ref.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/test/mir-opt/const_prop/mutable_variable_aggregate_mut_ref.rs b/src/test/mir-opt/const_prop/mutable_variable_aggregate_mut_ref.rs
new file mode 100644
index 000000000..79ac497c7
--- /dev/null
+++ b/src/test/mir-opt/const_prop/mutable_variable_aggregate_mut_ref.rs
@@ -0,0 +1,9 @@
+// compile-flags: -O
+
+// EMIT_MIR mutable_variable_aggregate_mut_ref.main.ConstProp.diff
+fn main() {
+ let mut x = (42, 43);
+ let z = &mut x;
+ z.1 = 99;
+ let y = x;
+}