From 851e9d64baa8d54a2960a3e5946143cb24b772b5 Mon Sep 17 00:00:00 2001 From: Markus Westerlind Date: Mon, 2 Mar 2020 20:08:21 +0100 Subject: [PATCH] s/merged_block_count/statements_to_merge/g --- src/librustc_mir/transform/simplify.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/librustc_mir/transform/simplify.rs b/src/librustc_mir/transform/simplify.rs index 1534b9bdcea..7aa1052d4b2 100644 --- a/src/librustc_mir/transform/simplify.rs +++ b/src/librustc_mir/transform/simplify.rs @@ -128,12 +128,12 @@ pub fn simplify(mut self) { changed |= inner_changed; } - let merged_block_count = + let statements_to_merge = merged_blocks.iter().map(|&i| self.basic_blocks[i].statements.len()).sum(); - if merged_block_count > 0 { + if statements_to_merge > 0 { let mut statements = std::mem::take(&mut self.basic_blocks[bb].statements); - statements.reserve(merged_block_count); + statements.reserve(statements_to_merge); for &from in &merged_blocks { statements.append(&mut self.basic_blocks[from].statements); }