Skip to content

Commit 796a045

Browse files
committed
Remove uses of HybridBitSet.
1 parent c4ce33c commit 796a045

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,5 +1,5 @@
11
use rustc_data_structures::fx::{FxIndexMap, FxIndexSet};
2-
use rustc_index::bit_set::HybridBitSet;
2+
use rustc_index::bit_set::BitSet;
33
use rustc_index::interval::IntervalSet;
44
use rustc_infer::infer::canonical::QueryRegionConstraints;
55
use rustc_middle::mir::{BasicBlock, Body, ConstraintCategory, Local, Location};
@@ -106,7 +106,7 @@ struct LivenessResults<'me, 'typeck, 'flow, 'tcx> {
106106
cx: LivenessContext<'me, 'typeck, 'flow, 'tcx>,
107107

108108
/// Set of points that define the current local.
109-
defs: HybridBitSet<PointIndex>,
109+
defs: BitSet<PointIndex>,
110110

111111
/// Points where the current variable is "use live" -- meaning
112112
/// that there is a future "full use" that may use its value.
@@ -129,7 +129,7 @@ impl<'me, 'typeck, 'flow, 'tcx> LivenessResults<'me, 'typeck, 'flow, 'tcx> {
129129
let num_points = cx.elements.num_points();
130130
LivenessResults {
131131
cx,
132-
defs: HybridBitSet::new_empty(num_points),
132+
defs: BitSet::new_empty(num_points),
133133
use_live_at: IntervalSet::new(num_points),
134134
drop_live_at: IntervalSet::new(num_points),
135135
drop_locations: vec![],

compiler/rustc_index/src/bit_set.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ impl<T: Idx> BitSet<T> {
293293
not_already
294294
}
295295

296-
fn last_set_in(&self, range: impl RangeBounds<T>) -> Option<T> {
296+
pub fn last_set_in(&self, range: impl RangeBounds<T>) -> Option<T> {
297297
let (start, end) = inclusive_start_end(range, self.domain_size)?;
298298
let (start_word_index, _) = word_index_and_mask(start);
299299
let (end_word_index, end_mask) = word_index_and_mask(end);
@@ -1278,7 +1278,7 @@ impl<T: Idx> SparseBitSet<T> {
12781278
}
12791279

12801280
impl<T: Idx + Ord> SparseBitSet<T> {
1281-
fn last_set_in(&self, range: impl RangeBounds<T>) -> Option<T> {
1281+
pub fn last_set_in(&self, range: impl RangeBounds<T>) -> Option<T> {
12821282
let mut last_leq = None;
12831283
for e in self.iter() {
12841284
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)