diff options
author | Niko Matsakis <niko@alum.mit.edu> | 2018-05-29 15:09:48 -0400 |
---|---|---|
committer | Niko Matsakis <niko@alum.mit.edu> | 2018-05-29 15:09:48 -0400 |
commit | 3a9134dec568d39e3d9b064b532483eb9daa0a2c (patch) | |
tree | da2f3db067b1a117739e643b9ddd60b83c28df9c | |
parent | tweak debug output some more (diff) | |
download | grust-3a9134dec568d39e3d9b064b532483eb9daa0a2c.tar.gz grust-3a9134dec568d39e3d9b064b532483eb9daa0a2c.tar.bz2 grust-3a9134dec568d39e3d9b064b532483eb9daa0a2c.tar.xz |
fix off by one error
-rw-r--r-- | src/librustc_mir/dataflow/impls/borrows.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/librustc_mir/dataflow/impls/borrows.rs b/src/librustc_mir/dataflow/impls/borrows.rs index 59ff12efac..cb3a14c411 100644 --- a/src/librustc_mir/dataflow/impls/borrows.rs +++ b/src/librustc_mir/dataflow/impls/borrows.rs | |||
@@ -88,7 +88,7 @@ fn precompute_borrows_out_of_scope<'a, 'tcx>( | |||
88 | let bb_data = &mir[location.block]; | 88 | let bb_data = &mir[location.block]; |
89 | // If this is the last statement in the block, then add the | 89 | // If this is the last statement in the block, then add the |
90 | // terminator successors next. | 90 | // terminator successors next. |
91 | if location.statement_index == bb_data.statements.len() - 1 { | 91 | if location.statement_index == bb_data.statements.len() { |
92 | // Add successors to locations to visit, if not visited before. | 92 | // Add successors to locations to visit, if not visited before. |
93 | if let Some(ref terminator) = bb_data.terminator { | 93 | if let Some(ref terminator) = bb_data.terminator { |
94 | for block in terminator.successors() { | 94 | for block in terminator.successors() { |