diff options
Diffstat (limited to 'src')
| -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, |
