From cbc865defd0b897ec9befafd4a1895bce58e3cf4 Mon Sep 17 00:00:00 2001 From: Santiago Pastorino Date: Tue, 20 Nov 2018 15:26:01 -0300 Subject: [PATCH] Use successor_within_block helper --- src/librustc_mir/borrow_check/nll/explain_borrow/find_use.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/librustc_mir/borrow_check/nll/explain_borrow/find_use.rs b/src/librustc_mir/borrow_check/nll/explain_borrow/find_use.rs index c5aaf5b811e..7d6385752c3 100644 --- a/src/librustc_mir/borrow_check/nll/explain_borrow/find_use.rs +++ b/src/librustc_mir/borrow_check/nll/explain_borrow/find_use.rs @@ -65,10 +65,7 @@ fn find(&mut self) -> Option { None => { if p.statement_index < block_data.statements.len() { - queue.push_back(Location { - statement_index: p.statement_index + 1, - ..p - }); + queue.push_back(p.successor_within_block()); } else { queue.extend( block_data -- 2.44.0