Skip to content

Commit f2a1b09

Browse files
committed
make const qualif use mixed bitsets instead of dense bitsets
1 parent ef96965 commit f2a1b09

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

compiler/rustc_const_eval/src/check_consts/resolver.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
use std::fmt;
66
use std::marker::PhantomData;
77

8-
use rustc_index::bit_set::BitSet;
8+
use rustc_index::bit_set::MixedBitSet;
99
use rustc_middle::mir::visit::Visitor;
1010
use rustc_middle::mir::{
1111
self, BasicBlock, CallReturnPlaces, Local, Location, Statement, StatementKind, TerminatorEdges,
@@ -248,10 +248,10 @@ where
248248
#[derive(Debug, PartialEq, Eq)]
249249
pub(super) struct State {
250250
/// Describes whether a local contains qualif.
251-
pub qualif: BitSet<Local>,
251+
pub qualif: MixedBitSet<Local>,
252252
/// Describes whether a local's address escaped and it might become qualified as a result an
253253
/// indirect mutation.
254-
pub borrow: BitSet<Local>,
254+
pub borrow: MixedBitSet<Local>,
255255
}
256256

257257
impl Clone for State {
@@ -320,8 +320,8 @@ where
320320

321321
fn bottom_value(&self, body: &mir::Body<'tcx>) -> Self::Domain {
322322
State {
323-
qualif: BitSet::new_empty(body.local_decls.len()),
324-
borrow: BitSet::new_empty(body.local_decls.len()),
323+
qualif: MixedBitSet::new_empty(body.local_decls.len()),
324+
borrow: MixedBitSet::new_empty(body.local_decls.len()),
325325
}
326326
}
327327

0 commit comments

Comments
 (0)