Skip to content

Commit b00db7c

Browse files
committed
Instrument statement_effect_on_borrows for the lhs = &place case.
1 parent 1c3fd02 commit b00db7c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/librustc_mir/dataflow/impls/borrows.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,8 +179,14 @@ impl<'a, 'gcx, 'tcx> BitDenotation for Borrows<'a, 'gcx, 'tcx> {
179179
if let RegionKind::ReEmpty = region {
180180
// If the borrowed value dies before the borrow is used, the region for
181181
// the borrow can be empty. Don't track the borrow in that case.
182+
debug!("Borrows::statement_effect_on_borrows \
183+
location: {:?} stmt: {:?} has empty region, killing {:?}",
184+
location, stmt.kind, index);
182185
sets.kill(&index);
183186
return
187+
} else {
188+
debug!("Borrows::statement_effect_on_borrows location: {:?} stmt: {:?}",
189+
location, stmt.kind);
184190
}
185191

186192
assert!(self.borrow_set.region_map.get(region).unwrap_or_else(|| {

0 commit comments

Comments
 (0)