Skip to content

Commit 6701d90

Browse files
committed
Remove IdxSet::reset_to_empty
1 parent c933440 commit 6701d90

File tree

2 files changed

+4
-9
lines changed

2 files changed

+4
-9
lines changed

src/librustc_data_structures/indexed_set.rs

-5
Original file line numberDiff line numberDiff line change
@@ -231,11 +231,6 @@ impl<T: Idx> IdxSet<T> {
231231
each_bit(self, max_bits, f)
232232
}
233233

234-
/// Removes all elements from this set.
235-
pub fn reset_to_empty(&mut self) {
236-
for word in self.words_mut() { *word = 0; }
237-
}
238-
239234
pub fn elems(&self, universe_size: usize) -> Elems<T> {
240235
Elems { i: 0, set: self, universe_size: universe_size }
241236
}

src/librustc_mir/dataflow/at_location.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -147,8 +147,8 @@ impl<BD> FlowsAtLocation for FlowAtLocation<BD>
147147
}
148148

149149
fn reconstruct_statement_effect(&mut self, loc: Location) {
150-
self.stmt_gen.reset_to_empty();
151-
self.stmt_kill.reset_to_empty();
150+
self.stmt_gen.clear();
151+
self.stmt_kill.clear();
152152
{
153153
let mut sets = BlockSets {
154154
on_entry: &mut self.curr_state,
@@ -172,8 +172,8 @@ impl<BD> FlowsAtLocation for FlowAtLocation<BD>
172172
}
173173

174174
fn reconstruct_terminator_effect(&mut self, loc: Location) {
175-
self.stmt_gen.reset_to_empty();
176-
self.stmt_kill.reset_to_empty();
175+
self.stmt_gen.clear();
176+
self.stmt_kill.clear();
177177
{
178178
let mut sets = BlockSets {
179179
on_entry: &mut self.curr_state,

0 commit comments

Comments
 (0)