Skip to content

Commit 7e64de4

Browse files
committed
Remove uses of HybridBitSet.
1 parent d5fd099 commit 7e64de4

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

compiler/rustc_borrowck/src/type_check/liveness/trace.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use rustc_data_structures::fx::{FxIndexMap, FxIndexSet};
22
use rustc_data_structures::graph::WithSuccessors;
3-
use rustc_index::bit_set::HybridBitSet;
3+
use rustc_index::bit_set::BitSet;
44
use rustc_index::interval::IntervalSet;
55
use rustc_infer::infer::canonical::QueryRegionConstraints;
66
use rustc_infer::infer::outlives::for_liveness;
@@ -135,7 +135,7 @@ struct LivenessResults<'me, 'typeck, 'flow, 'tcx> {
135135
cx: LivenessContext<'me, 'typeck, 'flow, 'tcx>,
136136

137137
/// Set of points that define the current local.
138-
defs: HybridBitSet<PointIndex>,
138+
defs: BitSet<PointIndex>,
139139

140140
/// Points where the current variable is "use live" -- meaning
141141
/// 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> {
158158
let num_points = cx.elements.num_points();
159159
LivenessResults {
160160
cx,
161-
defs: HybridBitSet::new_empty(num_points),
161+
defs: BitSet::new_empty(num_points),
162162
use_live_at: IntervalSet::new(num_points),
163163
drop_live_at: IntervalSet::new(num_points),
164164
drop_locations: vec![],

compiler/rustc_index/src/bit_set.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ impl<T: Idx> BitSet<T> {
284284
not_already
285285
}
286286

287-
fn last_set_in(&self, range: impl RangeBounds<T>) -> Option<T> {
287+
pub fn last_set_in(&self, range: impl RangeBounds<T>) -> Option<T> {
288288
let (start, end) = inclusive_start_end(range, self.domain_size)?;
289289
let (start_word_index, _) = word_index_and_mask(start);
290290
let (end_word_index, end_mask) = word_index_and_mask(end);
@@ -1299,7 +1299,7 @@ impl<T: Idx> SparseBitSet<T> {
12991299
}
13001300

13011301
impl<T: Idx + Ord> SparseBitSet<T> {
1302-
fn last_set_in(&self, range: impl RangeBounds<T>) -> Option<T> {
1302+
pub fn last_set_in(&self, range: impl RangeBounds<T>) -> Option<T> {
13031303
let mut last_leq = None;
13041304
for e in self.iter() {
13051305
if range.contains(e) {

compiler/rustc_mir_transform/src/nrvo.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//! See the docs for [`RenameReturnPlace`].
22
33
use rustc_hir::Mutability;
4-
use rustc_index::bit_set::HybridBitSet;
4+
use rustc_index::bit_set::BitSet;
55
use rustc_middle::mir::visit::{MutVisitor, NonUseContext, PlaceContext, Visitor};
66
use rustc_middle::mir::{self, BasicBlock, Local, Location};
77
use rustc_middle::ty::TyCtxt;
@@ -123,7 +123,7 @@ fn find_local_assigned_to_return_place(
123123
body: &mut mir::Body<'_>,
124124
) -> Option<Local> {
125125
let mut block = start;
126-
let mut seen = HybridBitSet::new_empty(body.basic_blocks.len());
126+
let mut seen = BitSet::new_empty(body.basic_blocks.len());
127127

128128
// Iterate as long as `block` has exactly one predecessor that we have not yet visited.
129129
while seen.insert(block) {

0 commit comments

Comments
 (0)