Skip to content

Commit c2f0a98

Browse files
Auto merge of #113382 - lqd:test-mcp510, r=<try>
[perf] test MCP510 r? `@ghost`
2 parents 015c777 + c72a184 commit c2f0a98

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

compiler/rustc_borrowck/src/dataflow.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use std::fmt;
22

33
use rustc_data_structures::fx::FxIndexMap;
44
use rustc_data_structures::graph;
5-
use rustc_index::bit_set::DenseBitSet;
5+
use rustc_index::bit_set::{DenseBitSet, MixedBitSet};
66
use rustc_middle::mir::{
77
self, BasicBlock, Body, CallReturnPlaces, Location, Place, TerminatorEdges,
88
};
@@ -548,7 +548,7 @@ impl<'a, 'tcx> Borrows<'a, 'tcx> {
548548
}
549549
}
550550

551-
type BorrowsDomain = DenseBitSet<BorrowIndex>;
551+
pub(crate) type BorrowsDomain = MixedBitSet<BorrowIndex>;
552552

553553
/// Forward dataflow computation of the set of borrows that are in scope at a particular location.
554554
/// - we gen the introduced loans
@@ -564,7 +564,7 @@ impl<'tcx> rustc_mir_dataflow::Analysis<'tcx> for Borrows<'_, 'tcx> {
564564

565565
fn bottom_value(&self, _: &mir::Body<'tcx>) -> Self::Domain {
566566
// bottom = nothing is reserved or activated yet;
567-
DenseBitSet::new_empty(self.borrow_set.len())
567+
BorrowsDomain::new_empty(self.borrow_set.len())
568568
}
569569

570570
fn initialize_start_block(&self, _: &mir::Body<'tcx>, _: &mut Self::Domain) {

compiler/rustc_borrowck/src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ use rustc_errors::LintDiagnostic;
2929
use rustc_hir as hir;
3030
use rustc_hir::CRATE_HIR_ID;
3131
use rustc_hir::def_id::LocalDefId;
32-
use rustc_index::bit_set::{DenseBitSet, MixedBitSet};
32+
use rustc_index::bit_set::MixedBitSet;
3333
use rustc_index::{IndexSlice, IndexVec};
3434
use rustc_infer::infer::{
3535
InferCtxt, NllRegionVariableOrigin, RegionVariableOrigin, TyCtxtInferExt,
@@ -1151,11 +1151,11 @@ impl<'a, 'tcx> MirBorrowckCtxt<'a, '_, 'tcx> {
11511151
&self,
11521152
location: Location,
11531153
state: &'s BorrowckDomain,
1154-
) -> Cow<'s, DenseBitSet<BorrowIndex>> {
1154+
) -> Cow<'s, dataflow::BorrowsDomain> {
11551155
if let Some(polonius) = &self.polonius_output {
11561156
// Use polonius output if it has been enabled.
11571157
let location = self.location_table.start_index(location);
1158-
let mut polonius_output = DenseBitSet::new_empty(self.borrow_set.len());
1158+
let mut polonius_output = dataflow::BorrowsDomain::new_empty(self.borrow_set.len());
11591159
for &idx in polonius.errors_at(location) {
11601160
polonius_output.insert(idx);
11611161
}

0 commit comments

Comments
 (0)