diff options
| author | varkor <github@varkor.com> | 2018-03-06 00:58:01 +0000 |
|---|---|---|
| committer | varkor <github@varkor.com> | 2018-03-06 00:58:01 +0000 |
| commit | 6701d9020f0deb0e8d673fe5ad1247514b3e9db3 (patch) | |
| tree | d96ec1df8166981cd9ad6743c7589143cb18dd16 | |
| parent | c9334404f06a188854af33835a0efe1e834e4ac4 (diff) | |
Remove IdxSet::reset_to_empty
| -rw-r--r-- | src/librustc_data_structures/indexed_set.rs | 5 | ||||
| -rw-r--r-- | src/librustc_mir/dataflow/at_location.rs | 8 |
2 files changed, 4 insertions, 9 deletions
diff --git a/src/librustc_data_structures/indexed_set.rs b/src/librustc_data_structures/indexed_set.rs index 223e08de826..7c926cc784b 100644 --- a/src/librustc_data_structures/indexed_set.rs +++ b/src/librustc_data_structures/indexed_set.rs @@ -231,11 +231,6 @@ impl<T: Idx> IdxSet<T> { each_bit(self, max_bits, f) } - /// Removes all elements from this set. - pub fn reset_to_empty(&mut self) { - for word in self.words_mut() { *word = 0; } - } - pub fn elems(&self, universe_size: usize) -> Elems<T> { Elems { i: 0, set: self, universe_size: universe_size } } diff --git a/src/librustc_mir/dataflow/at_location.rs b/src/librustc_mir/dataflow/at_location.rs index b1f73bfbe22..30248ccf931 100644 --- a/src/librustc_mir/dataflow/at_location.rs +++ b/src/librustc_mir/dataflow/at_location.rs @@ -147,8 +147,8 @@ impl<BD> FlowsAtLocation for FlowAtLocation<BD> } fn reconstruct_statement_effect(&mut self, loc: Location) { - self.stmt_gen.reset_to_empty(); - self.stmt_kill.reset_to_empty(); + self.stmt_gen.clear(); + self.stmt_kill.clear(); { let mut sets = BlockSets { on_entry: &mut self.curr_state, @@ -172,8 +172,8 @@ impl<BD> FlowsAtLocation for FlowAtLocation<BD> } fn reconstruct_terminator_effect(&mut self, loc: Location) { - self.stmt_gen.reset_to_empty(); - self.stmt_kill.reset_to_empty(); + self.stmt_gen.clear(); + self.stmt_kill.clear(); { let mut sets = BlockSets { on_entry: &mut self.curr_state, |
