Skip to content

Commit

Permalink
FileCheck mutable_variable_aggregate_mut_ref.
Browse files Browse the repository at this point in the history
  • Loading branch information
cjgillot committed Dec 2, 2023
1 parent 03c5ad1 commit 3e169ab
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
// skip-filecheck
// unit-test: ConstProp

// EMIT_MIR mutable_variable_aggregate_mut_ref.main.ConstProp.diff
fn main() {
// CHECK-LABEL: fn main(
// CHECK: debug x => [[x:_.*]];
// CHECK: debug z => [[z:_.*]];
// CHECK: debug y => [[y:_.*]];
// CHECK: [[x]] = (const 42_i32, const 43_i32);
// CHECK: [[z]] = &mut [[x]];
// CHECK: ((*[[z]]).1: i32) = const 99_i32;
// CHECK: [[y]] = [[x]];
let mut x = (42, 43);
let z = &mut x;
z.1 = 99;
Expand Down

0 comments on commit 3e169ab

Please sign in to comment.