Skip to content

Commit 346929c

Browse files
committed
Remove unused HybridBitSet methods from BitSetExt.
1 parent ded4dfd commit 346929c

File tree

2 files changed

+2
-34
lines changed

2 files changed

+2
-34
lines changed

compiler/rustc_mir_dataflow/src/framework/lattice.rs

+1-15
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
4141
use std::iter;
4242

43-
use rustc_index::bit_set::{BitSet, ChunkedBitSet, HybridBitSet};
43+
use rustc_index::bit_set::{BitSet, ChunkedBitSet};
4444
use rustc_index::{Idx, IndexVec};
4545

4646
use crate::framework::BitSetExt;
@@ -227,20 +227,6 @@ impl<T, S: BitSetExt<T>> BitSetExt<T> for MaybeReachable<S> {
227227
fn contains(&self, elem: T) -> bool {
228228
self.contains(elem)
229229
}
230-
231-
fn union(&mut self, other: &HybridBitSet<T>) {
232-
match self {
233-
MaybeReachable::Unreachable => {}
234-
MaybeReachable::Reachable(set) => set.union(other),
235-
}
236-
}
237-
238-
fn subtract(&mut self, other: &HybridBitSet<T>) {
239-
match self {
240-
MaybeReachable::Unreachable => {}
241-
MaybeReachable::Reachable(set) => set.subtract(other),
242-
}
243-
}
244230
}
245231

246232
impl<V: Clone> Clone for MaybeReachable<V> {

compiler/rustc_mir_dataflow/src/framework/mod.rs

+1-19
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
use std::cmp::Ordering;
3636

3737
use rustc_data_structures::work_queue::WorkQueue;
38-
use rustc_index::bit_set::{BitSet, ChunkedBitSet, HybridBitSet};
38+
use rustc_index::bit_set::{BitSet, ChunkedBitSet};
3939
use rustc_index::{Idx, IndexVec};
4040
use rustc_middle::bug;
4141
use rustc_middle::mir::{self, BasicBlock, CallReturnPlaces, Location, TerminatorEdges, traversal};
@@ -63,36 +63,18 @@ pub use self::visitor::{ResultsVisitor, visit_results};
6363
/// operations needed by all of them.
6464
pub trait BitSetExt<T> {
6565
fn contains(&self, elem: T) -> bool;
66-
fn union(&mut self, other: &HybridBitSet<T>);
67-
fn subtract(&mut self, other: &HybridBitSet<T>);
6866
}
6967

7068
impl<T: Idx> BitSetExt<T> for BitSet<T> {
7169
fn contains(&self, elem: T) -> bool {
7270
self.contains(elem)
7371
}
74-
75-
fn union(&mut self, other: &HybridBitSet<T>) {
76-
self.union(other);
77-
}
78-
79-
fn subtract(&mut self, other: &HybridBitSet<T>) {
80-
self.subtract(other);
81-
}
8272
}
8373

8474
impl<T: Idx> BitSetExt<T> for ChunkedBitSet<T> {
8575
fn contains(&self, elem: T) -> bool {
8676
self.contains(elem)
8777
}
88-
89-
fn union(&mut self, other: &HybridBitSet<T>) {
90-
self.union(other);
91-
}
92-
93-
fn subtract(&mut self, other: &HybridBitSet<T>) {
94-
self.subtract(other);
95-
}
9678
}
9779

9880
/// A dataflow problem with an arbitrarily complex transfer function.

0 commit comments

Comments
 (0)