diff options
| author | Camille GILLOT <gillot.camille@gmail.com> | 2023-09-25 16:08:16 +0000 |
|---|---|---|
| committer | Camille GILLOT <gillot.camille@gmail.com> | 2024-01-22 22:53:20 +0000 |
| commit | 7e64de431ee8810d5f78f3dcbedfe207be9fc8d4 (patch) | |
| tree | 7a40d01e2cb9c8caa417b58ccb736528dbedcc7b /compiler | |
| parent | d5fd0997291ca0135401a39dff25c8a9c13b8961 (diff) | |
| download | rust-7e64de431ee8810d5f78f3dcbedfe207be9fc8d4.tar.gz rust-7e64de431ee8810d5f78f3dcbedfe207be9fc8d4.zip | |
Remove uses of HybridBitSet.
Diffstat (limited to 'compiler')
| -rw-r--r-- | compiler/rustc_borrowck/src/type_check/liveness/trace.rs | 6 | ||||
| -rw-r--r-- | compiler/rustc_index/src/bit_set.rs | 4 | ||||
| -rw-r--r-- | compiler/rustc_mir_transform/src/nrvo.rs | 4 |
3 files changed, 7 insertions, 7 deletions
diff --git a/compiler/rustc_borrowck/src/type_check/liveness/trace.rs b/compiler/rustc_borrowck/src/type_check/liveness/trace.rs index eec128b5f1d..18975a4e3b2 100644 --- a/compiler/rustc_borrowck/src/type_check/liveness/trace.rs +++ b/compiler/rustc_borrowck/src/type_check/liveness/trace.rs @@ -1,6 +1,6 @@ use rustc_data_structures::fx::{FxIndexMap, FxIndexSet}; use rustc_data_structures::graph::WithSuccessors; -use rustc_index::bit_set::HybridBitSet; +use rustc_index::bit_set::BitSet; use rustc_index::interval::IntervalSet; use rustc_infer::infer::canonical::QueryRegionConstraints; use rustc_infer::infer::outlives::for_liveness; @@ -135,7 +135,7 @@ struct LivenessResults<'me, 'typeck, 'flow, 'tcx> { cx: LivenessContext<'me, 'typeck, 'flow, 'tcx>, /// Set of points that define the current local. - defs: HybridBitSet<PointIndex>, + defs: BitSet<PointIndex>, /// Points where the current variable is "use live" -- meaning /// that there is a future "full use" that may use its value. @@ -158,7 +158,7 @@ impl<'me, 'typeck, 'flow, 'tcx> LivenessResults<'me, 'typeck, 'flow, 'tcx> { let num_points = cx.elements.num_points(); LivenessResults { cx, - defs: HybridBitSet::new_empty(num_points), + defs: BitSet::new_empty(num_points), use_live_at: IntervalSet::new(num_points), drop_live_at: IntervalSet::new(num_points), drop_locations: vec![], diff --git a/compiler/rustc_index/src/bit_set.rs b/compiler/rustc_index/src/bit_set.rs index dfa3ced9dc1..12f8e42c78f 100644 --- a/compiler/rustc_index/src/bit_set.rs +++ b/compiler/rustc_index/src/bit_set.rs @@ -284,7 +284,7 @@ impl<T: Idx> BitSet<T> { not_already } - fn last_set_in(&self, range: impl RangeBounds<T>) -> Option<T> { + pub fn last_set_in(&self, range: impl RangeBounds<T>) -> Option<T> { let (start, end) = inclusive_start_end(range, self.domain_size)?; let (start_word_index, _) = word_index_and_mask(start); let (end_word_index, end_mask) = word_index_and_mask(end); @@ -1299,7 +1299,7 @@ impl<T: Idx> SparseBitSet<T> { } impl<T: Idx + Ord> SparseBitSet<T> { - fn last_set_in(&self, range: impl RangeBounds<T>) -> Option<T> { + pub fn last_set_in(&self, range: impl RangeBounds<T>) -> Option<T> { let mut last_leq = None; for e in self.iter() { if range.contains(e) { diff --git a/compiler/rustc_mir_transform/src/nrvo.rs b/compiler/rustc_mir_transform/src/nrvo.rs index ff309bd10ec..c3a92911bbf 100644 --- a/compiler/rustc_mir_transform/src/nrvo.rs +++ b/compiler/rustc_mir_transform/src/nrvo.rs @@ -1,7 +1,7 @@ //! See the docs for [`RenameReturnPlace`]. use rustc_hir::Mutability; -use rustc_index::bit_set::HybridBitSet; +use rustc_index::bit_set::BitSet; use rustc_middle::mir::visit::{MutVisitor, NonUseContext, PlaceContext, Visitor}; use rustc_middle::mir::{self, BasicBlock, Local, Location}; use rustc_middle::ty::TyCtxt; @@ -123,7 +123,7 @@ fn find_local_assigned_to_return_place( body: &mut mir::Body<'_>, ) -> Option<Local> { let mut block = start; - let mut seen = HybridBitSet::new_empty(body.basic_blocks.len()); + let mut seen = BitSet::new_empty(body.basic_blocks.len()); // Iterate as long as `block` has exactly one predecessor that we have not yet visited. while seen.insert(block) { |
