Skip to content

Commit 400c56e

Browse files
committed
Replace locals in debuginfo records during dest_prop
1 parent b2e81b0 commit 400c56e

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

compiler/rustc_mir_transform/src/dest_prop.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,6 @@ impl<'tcx> MutVisitor<'tcx> for Merger<'tcx> {
277277
if self.merged_locals.contains(*local) =>
278278
{
279279
statement.make_nop(true);
280-
return;
281280
}
282281
_ => (),
283282
};

tests/mir-opt/debuginfo/dest_prop.remap_debuginfo_locals.DestinationPropagation.diff

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,12 @@
99
let mut _4: bool;
1010

1111
bb0: {
12-
// DBG: _3 = &_1;
12+
- // DBG: _3 = &_1;
1313
- StorageLive(_4);
1414
- _4 = copy _1;
1515
- _3 = copy _2;
1616
- switchInt(copy _4) -> [1: bb1, otherwise: bb2];
17+
+ // DBG: _2 = &_1;
1718
+ nop;
1819
+ nop;
1920
+ nop;

tests/crashes/147485-2.rs renamed to tests/ui/debuginfo/dest_prop_debuginfo-147485.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
//@ known-bug: #147485
1+
//@ build-pass
22
//@ compile-flags: -g -O
33

4+
// Regression test for #147485.
5+
46
#![crate_type = "lib"]
57

68
pub fn foo(a: bool, b: bool) -> bool {

0 commit comments

Comments
 (0)