Remove extra calls to kill_loans_out_of_scope_at_location - keep only before_statement_effect and before_terminator_effect.

This commit is contained in:
David Wood 2018-05-19 15:39:38 +01:00
parent a722296b6e
commit 280c6fadee
No known key found for this signature in database
GPG key ID: 01760B4F9F53F154

View file

@ -150,8 +150,6 @@ impl<'a, 'gcx, 'tcx> BitDenotation for Borrows<'a, 'gcx, 'tcx> {
panic!("could not find statement at location {:?}");
});
self.kill_loans_out_of_scope_at_location(sets, location);
match stmt.kind {
mir::StatementKind::EndRegion(_) => {
}
@ -253,9 +251,6 @@ impl<'a, 'gcx, 'tcx> BitDenotation for Borrows<'a, 'gcx, 'tcx> {
});
let term = block.terminator();
self.kill_loans_out_of_scope_at_location(sets, location);
match term.kind {
mir::TerminatorKind::Resume |
mir::TerminatorKind::Return |