Skip to content

Commit 868d9f3

Browse files
committed
Remove unused HybridBitSet methods from BitSetExt.
1 parent 9c05587 commit 868d9f3

File tree

2 files changed

+2
-42
lines changed

2 files changed

+2
-42
lines changed

compiler/rustc_mir_dataflow/src/framework/lattice.rs

Lines changed: 1 addition & 23 deletions
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;
@@ -198,14 +198,6 @@ impl<T: Idx> BitSetExt<T> for Dual<BitSet<T>> {
198198
fn contains(&self, elem: T) -> bool {
199199
self.0.contains(elem)
200200
}
201-
202-
fn union(&mut self, other: &HybridBitSet<T>) {
203-
self.0.union(other);
204-
}
205-
206-
fn subtract(&mut self, other: &HybridBitSet<T>) {
207-
self.0.subtract(other);
208-
}
209201
}
210202

211203
impl<T: MeetSemiLattice> JoinSemiLattice for Dual<T> {
@@ -331,20 +323,6 @@ impl<T, S: BitSetExt<T>> BitSetExt<T> for MaybeReachable<S> {
331323
fn contains(&self, elem: T) -> bool {
332324
self.contains(elem)
333325
}
334-
335-
fn union(&mut self, other: &HybridBitSet<T>) {
336-
match self {
337-
MaybeReachable::Unreachable => {}
338-
MaybeReachable::Reachable(set) => set.union(other),
339-
}
340-
}
341-
342-
fn subtract(&mut self, other: &HybridBitSet<T>) {
343-
match self {
344-
MaybeReachable::Unreachable => {}
345-
MaybeReachable::Reachable(set) => set.subtract(other),
346-
}
347-
}
348326
}
349327

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

compiler/rustc_mir_dataflow/src/framework/mod.rs

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
use std::cmp::Ordering;
3535

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

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

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

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

0 commit comments

Comments
 (0)