diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-11-23 09:03:35 +1100 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-11-29 17:23:34 +1100 |
| commit | 346929cb809bed10de1f69a1c62fcdb63860ecd6 (patch) | |
| tree | f7a4cb7b0011ee9f50fc8ff66f44a4bec95cee39 /compiler/rustc_mir_dataflow/src/framework | |
| parent | ded4dfde19d0bbe526e64edb32931a2b42b2b848 (diff) | |
| download | rust-346929cb809bed10de1f69a1c62fcdb63860ecd6.tar.gz rust-346929cb809bed10de1f69a1c62fcdb63860ecd6.zip | |
Remove unused `HybridBitSet` methods from `BitSetExt`.
Diffstat (limited to 'compiler/rustc_mir_dataflow/src/framework')
| -rw-r--r-- | compiler/rustc_mir_dataflow/src/framework/lattice.rs | 16 | ||||
| -rw-r--r-- | compiler/rustc_mir_dataflow/src/framework/mod.rs | 20 |
2 files changed, 2 insertions, 34 deletions
diff --git a/compiler/rustc_mir_dataflow/src/framework/lattice.rs b/compiler/rustc_mir_dataflow/src/framework/lattice.rs index 6d2a7a099a0..e2b56aedca3 100644 --- a/compiler/rustc_mir_dataflow/src/framework/lattice.rs +++ b/compiler/rustc_mir_dataflow/src/framework/lattice.rs @@ -40,7 +40,7 @@ use std::iter; -use rustc_index::bit_set::{BitSet, ChunkedBitSet, HybridBitSet}; +use rustc_index::bit_set::{BitSet, ChunkedBitSet}; use rustc_index::{Idx, IndexVec}; use crate::framework::BitSetExt; @@ -227,20 +227,6 @@ impl<T, S: BitSetExt<T>> BitSetExt<T> for MaybeReachable<S> { fn contains(&self, elem: T) -> bool { self.contains(elem) } - - fn union(&mut self, other: &HybridBitSet<T>) { - match self { - MaybeReachable::Unreachable => {} - MaybeReachable::Reachable(set) => set.union(other), - } - } - - fn subtract(&mut self, other: &HybridBitSet<T>) { - match self { - MaybeReachable::Unreachable => {} - MaybeReachable::Reachable(set) => set.subtract(other), - } - } } impl<V: Clone> Clone for MaybeReachable<V> { diff --git a/compiler/rustc_mir_dataflow/src/framework/mod.rs b/compiler/rustc_mir_dataflow/src/framework/mod.rs index bb652a75caa..f1ea94e1689 100644 --- a/compiler/rustc_mir_dataflow/src/framework/mod.rs +++ b/compiler/rustc_mir_dataflow/src/framework/mod.rs @@ -35,7 +35,7 @@ use std::cmp::Ordering; use rustc_data_structures::work_queue::WorkQueue; -use rustc_index::bit_set::{BitSet, ChunkedBitSet, HybridBitSet}; +use rustc_index::bit_set::{BitSet, ChunkedBitSet}; use rustc_index::{Idx, IndexVec}; use rustc_middle::bug; use rustc_middle::mir::{self, BasicBlock, CallReturnPlaces, Location, TerminatorEdges, traversal}; @@ -63,36 +63,18 @@ pub use self::visitor::{ResultsVisitor, visit_results}; /// operations needed by all of them. pub trait BitSetExt<T> { fn contains(&self, elem: T) -> bool; - fn union(&mut self, other: &HybridBitSet<T>); - fn subtract(&mut self, other: &HybridBitSet<T>); } impl<T: Idx> BitSetExt<T> for BitSet<T> { fn contains(&self, elem: T) -> bool { self.contains(elem) } - - fn union(&mut self, other: &HybridBitSet<T>) { - self.union(other); - } - - fn subtract(&mut self, other: &HybridBitSet<T>) { - self.subtract(other); - } } impl<T: Idx> BitSetExt<T> for ChunkedBitSet<T> { fn contains(&self, elem: T) -> bool { self.contains(elem) } - - fn union(&mut self, other: &HybridBitSet<T>) { - self.union(other); - } - - fn subtract(&mut self, other: &HybridBitSet<T>) { - self.subtract(other); - } } /// A dataflow problem with an arbitrarily complex transfer function. |
