Instrument statement_effect_on_borrows
for the lhs = &place
case.
This commit is contained in:
parent
1c3fd02a4c
commit
b00db7c75b
@ -179,8 +179,14 @@ impl<'a, 'gcx, 'tcx> BitDenotation for Borrows<'a, 'gcx, 'tcx> {
|
||||
if let RegionKind::ReEmpty = region {
|
||||
// If the borrowed value dies before the borrow is used, the region for
|
||||
// the borrow can be empty. Don't track the borrow in that case.
|
||||
debug!("Borrows::statement_effect_on_borrows \
|
||||
location: {:?} stmt: {:?} has empty region, killing {:?}",
|
||||
location, stmt.kind, index);
|
||||
sets.kill(&index);
|
||||
return
|
||||
} else {
|
||||
debug!("Borrows::statement_effect_on_borrows location: {:?} stmt: {:?}",
|
||||
location, stmt.kind);
|
||||
}
|
||||
|
||||
assert!(self.borrow_set.region_map.get(region).unwrap_or_else(|| {
|
||||
|
Loading…
x
Reference in New Issue
Block a user