diff --git a/tests/mir-opt/copy-prop/reborrow.rs b/tests/mir-opt/copy-prop/reborrow.rs index 51a1f92cde2f..8bc81106e994 100644 --- a/tests/mir-opt/copy-prop/reborrow.rs +++ b/tests/mir-opt/copy-prop/reborrow.rs @@ -1,4 +1,3 @@ -// skip-filecheck // EMIT_MIR_FOR_EACH_PANIC_STRATEGY // Check that CopyProp considers reborrows as not mutating the pointer. //@ test-mir-pass: CopyProp @@ -8,6 +7,9 @@ fn opaque(_: impl Sized) {} // EMIT_MIR reborrow.remut.CopyProp.diff fn remut(mut x: u8) { + // CHECK-LABEL: fn remut( + // CHECK: debug a => [[a:_.*]]; + // CHECK: debug c => [[a]]; let a = &mut x; let b = &mut *a; //< this cannot mutate a. let c = a; //< so `c` and `a` can be merged. @@ -16,6 +18,9 @@ fn remut(mut x: u8) { // EMIT_MIR reborrow.reraw.CopyProp.diff fn reraw(mut x: u8) { + // CHECK-LABEL: fn reraw( + // CHECK: debug a => [[a:_.*]]; + // CHECK: debug c => [[a]]; let a = &mut x; let b = &raw mut *a; //< this cannot mutate a. let c = a; //< so `c` and `a` can be merged. @@ -24,6 +29,9 @@ fn reraw(mut x: u8) { // EMIT_MIR reborrow.miraw.CopyProp.diff fn miraw(mut x: u8) { + // CHECK-LABEL: fn miraw( + // CHECK: debug a => [[a:_.*]]; + // CHECK: debug c => [[a]]; let a = &raw mut x; let b = unsafe { &raw mut *a }; //< this cannot mutate a. let c = a; //< so `c` and `a` can be merged. @@ -32,6 +40,9 @@ fn miraw(mut x: u8) { // EMIT_MIR reborrow.demiraw.CopyProp.diff fn demiraw(mut x: u8) { + // CHECK-LABEL: fn demiraw( + // CHECK: debug a => [[a:_.*]]; + // CHECK: debug c => [[a]]; let a = &raw mut x; let b = unsafe { &mut *a }; //< this cannot mutate a. let c = a; //< so `c` and `a` can be merged.