about summary refs log tree commit diff
diff options
context:
space:
mode:
authorCamille GILLOT <gillot.camille@gmail.com>2023-12-02 20:54:56 +0000
committerCamille GILLOT <gillot.camille@gmail.com>2023-12-02 20:54:56 +0000
commit45dd5d6bf340b48cf2a00755da4ca9dd7b6eb640 (patch)
treea192a9c515a0e1cf3c7ffe41fb3870a93df345b2
parent6a8eea8f5b7feb9e1e87cf1673c11eab93307001 (diff)
downloadrust-45dd5d6bf340b48cf2a00755da4ca9dd7b6eb640.tar.gz
rust-45dd5d6bf340b48cf2a00755da4ca9dd7b6eb640.zip
FileCheck mutable_variable_unprop_assign.
-rw-r--r--tests/mir-opt/const_prop/mutable_variable_unprop_assign.rs14
1 files changed, 12 insertions, 2 deletions
diff --git a/tests/mir-opt/const_prop/mutable_variable_unprop_assign.rs b/tests/mir-opt/const_prop/mutable_variable_unprop_assign.rs
index 6bdb136a949..04e347fc03d 100644
--- a/tests/mir-opt/const_prop/mutable_variable_unprop_assign.rs
+++ b/tests/mir-opt/const_prop/mutable_variable_unprop_assign.rs
@@ -1,14 +1,24 @@
-// skip-filecheck
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 // unit-test: ConstProp
 
 // EMIT_MIR mutable_variable_unprop_assign.main.ConstProp.diff
 fn main() {
+    // CHECK-LABEL: fn main(
+    // CHECK: debug a => [[a:_.*]];
+    // CHECK: debug x => [[x:_.*]];
+    // CHECK: debug y => [[y:_.*]];
+    // CHECK: debug z => [[z:_.*]];
+    // CHECK: [[a]] = foo()
+    // CHECK: [[x]] = const (1_i32, 2_i32);
+    // CHECK: [[tmp:_.*]] = [[a]];
+    // CHECK: ([[x]].1: i32) = move [[tmp]];
+    // CHECK: [[y]] = ([[x]].1: i32);
+    // CHECK: [[z]] = const 1_i32;
     let a = foo();
     let mut x: (i32, i32) = (1, 2);
     x.1 = a;
     let y = x.1;
-    let z = x.0; // this could theoretically be allowed, but we can't handle it right now
+    let z = x.0;
 }
 
 #[inline(never)]