diff options
| author | Clemens Wasser <clemens.wasser@gmail.com> | 2021-10-10 16:32:16 +0200 |
|---|---|---|
| committer | Clemens Wasser <clemens.wasser@gmail.com> | 2021-10-10 16:32:16 +0200 |
| commit | b8c151c9d20a2900aa1808424fcd0786827153c7 (patch) | |
| tree | 1457b69d03c461ad0b9fb95ca0c2ad698a15d400 /compiler/rustc_data_structures | |
| parent | 71dd0b928b8b175b69e56fc58e5878b73f090718 (diff) | |
| download | rust-b8c151c9d20a2900aa1808424fcd0786827153c7.tar.gz rust-b8c151c9d20a2900aa1808424fcd0786827153c7.zip | |
Remove for loop range
Diffstat (limited to 'compiler/rustc_data_structures')
| -rw-r--r-- | compiler/rustc_data_structures/src/obligation_forest/mod.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_data_structures/src/obligation_forest/mod.rs b/compiler/rustc_data_structures/src/obligation_forest/mod.rs index c6b1fc53f5b..caf515b0d19 100644 --- a/compiler/rustc_data_structures/src/obligation_forest/mod.rs +++ b/compiler/rustc_data_structures/src/obligation_forest/mod.rs @@ -612,7 +612,7 @@ impl<O: ForestObligation> ObligationForest<O> { fn compress(&mut self, mut outcome_cb: impl FnMut(&O)) { let orig_nodes_len = self.nodes.len(); let mut node_rewrites: Vec<_> = std::mem::take(&mut self.reused_node_vec); - debug_assert!(node_rewrites.is_empty()); + assert!(node_rewrites.is_empty()); node_rewrites.extend(0..orig_nodes_len); let mut dead_nodes = 0; @@ -623,7 +623,7 @@ impl<O: ForestObligation> ObligationForest<O> { // self.nodes[0..index - dead_nodes] are the first remaining nodes // self.nodes[index - dead_nodes..index] are all dead // self.nodes[index..] are unchanged - for (index, node_rewrite) in node_rewrites[..orig_nodes_len].iter_mut().enumerate() { + for (index, node_rewrite) in node_rewrites.iter_mut().enumerate() { let node = &self.nodes[index]; match node.state.get() { NodeState::Pending | NodeState::Waiting => { |
