diff --git a/tests/mir-opt/const_prop/ref_deref.main.ConstProp.diff b/tests/mir-opt/const_prop/ref_deref.main.ConstProp.diff index 6b897a88181b8..a54ae8d2fdde6 100644 --- a/tests/mir-opt/const_prop/ref_deref.main.ConstProp.diff +++ b/tests/mir-opt/const_prop/ref_deref.main.ConstProp.diff @@ -7,6 +7,9 @@ let mut _2: &i32; let _3: i32; let mut _4: &i32; + scope 1 { + debug a => _1; + } bb0: { StorageLive(_1); @@ -15,8 +18,8 @@ _2 = &(*_4); _1 = (*_2); StorageDead(_2); - StorageDead(_1); _0 = const (); + StorageDead(_1); return; } } diff --git a/tests/mir-opt/const_prop/ref_deref.rs b/tests/mir-opt/const_prop/ref_deref.rs index f2fa024f72212..5bceae749ff23 100644 --- a/tests/mir-opt/const_prop/ref_deref.rs +++ b/tests/mir-opt/const_prop/ref_deref.rs @@ -1,7 +1,9 @@ -// skip-filecheck // unit-test: ConstProp -// EMIT_MIR ref_deref.main.ConstProp.diff +// EMIT_MIR ref_deref.main.ConstProp.diff fn main() { - *(&4); + // CHECK-LABEL: fn main( + // CHECK: debug a => [[a:_.*]]; + // CHECK: [[a]] = (*{{_.*}}); + let a = *(&4); } diff --git a/tests/mir-opt/const_prop/ref_deref_project.main.ConstProp.diff b/tests/mir-opt/const_prop/ref_deref_project.main.ConstProp.diff index 7f616166573cd..05a4e17742d82 100644 --- a/tests/mir-opt/const_prop/ref_deref_project.main.ConstProp.diff +++ b/tests/mir-opt/const_prop/ref_deref_project.main.ConstProp.diff @@ -7,6 +7,9 @@ let mut _2: &i32; let _3: (i32, i32); let mut _4: &(i32, i32); + scope 1 { + debug a => _1; + } bb0: { StorageLive(_1); @@ -15,8 +18,8 @@ _2 = &((*_4).1: i32); _1 = (*_2); StorageDead(_2); - StorageDead(_1); _0 = const (); + StorageDead(_1); return; } } diff --git a/tests/mir-opt/const_prop/ref_deref_project.rs b/tests/mir-opt/const_prop/ref_deref_project.rs index 1b9e0acb2c054..4b5c67303161d 100644 --- a/tests/mir-opt/const_prop/ref_deref_project.rs +++ b/tests/mir-opt/const_prop/ref_deref_project.rs @@ -1,7 +1,10 @@ -// skip-filecheck +// This does not currently propagate (#67862) // unit-test: ConstProp -// EMIT_MIR ref_deref_project.main.ConstProp.diff +// EMIT_MIR ref_deref_project.main.ConstProp.diff fn main() { - *(&(4, 5).1); // This does not currently propagate (#67862) + // CHECK-LABEL: fn main( + // CHECK: debug a => [[a:_.*]]; + // CHECK: [[a]] = (*{{_.*}}); + let a = *(&(4, 5).1); }