fix off by one error
This commit is contained in:
parent
948f77c71f
commit
3a9134dec5
1 changed files with 1 additions and 1 deletions
|
@ -88,7 +88,7 @@ fn precompute_borrows_out_of_scope<'a, 'tcx>(
|
|||
let bb_data = &mir[location.block];
|
||||
// If this is the last statement in the block, then add the
|
||||
// terminator successors next.
|
||||
if location.statement_index == bb_data.statements.len() - 1 {
|
||||
if location.statement_index == bb_data.statements.len() {
|
||||
// Add successors to locations to visit, if not visited before.
|
||||
if let Some(ref terminator) = bb_data.terminator {
|
||||
for block in terminator.successors() {
|
||||
|
|
Loading…
Add table
Reference in a new issue