Skip to content

Commit 3a9134d

Browse files
committed
fix off by one error
1 parent 948f77c commit 3a9134d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/librustc_mir/dataflow/impls/borrows.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ fn precompute_borrows_out_of_scope<'a, 'tcx>(
8888
let bb_data = &mir[location.block];
8989
// If this is the last statement in the block, then add the
9090
// terminator successors next.
91-
if location.statement_index == bb_data.statements.len() - 1 {
91+
if location.statement_index == bb_data.statements.len() {
9292
// Add successors to locations to visit, if not visited before.
9393
if let Some(ref terminator) = bb_data.terminator {
9494
for block in terminator.successors() {

0 commit comments

Comments
 (0)