@@ -2,7 +2,7 @@ use std::fmt;
2
2
3
3
use rustc_data_structures:: fx:: FxIndexMap ;
4
4
use rustc_data_structures:: graph;
5
- use rustc_index:: bit_set:: BitSet ;
5
+ use rustc_index:: bit_set:: DenseBitSet ;
6
6
use rustc_middle:: mir:: {
7
7
self , BasicBlock , Body , CallReturnPlaces , Location , Place , TerminatorEdges ,
8
8
} ;
@@ -180,7 +180,7 @@ pub struct Borrows<'a, 'tcx> {
180
180
}
181
181
182
182
struct OutOfScopePrecomputer < ' a , ' tcx > {
183
- visited : BitSet < mir:: BasicBlock > ,
183
+ visited : DenseBitSet < mir:: BasicBlock > ,
184
184
visit_stack : Vec < mir:: BasicBlock > ,
185
185
body : & ' a Body < ' tcx > ,
186
186
regioncx : & ' a RegionInferenceContext < ' tcx > ,
@@ -190,7 +190,7 @@ struct OutOfScopePrecomputer<'a, 'tcx> {
190
190
impl < ' a , ' tcx > OutOfScopePrecomputer < ' a , ' tcx > {
191
191
fn new ( body : & ' a Body < ' tcx > , regioncx : & ' a RegionInferenceContext < ' tcx > ) -> Self {
192
192
OutOfScopePrecomputer {
193
- visited : BitSet :: new_empty ( body. basic_blocks . len ( ) ) ,
193
+ visited : DenseBitSet :: new_empty ( body. basic_blocks . len ( ) ) ,
194
194
visit_stack : vec ! [ ] ,
195
195
body,
196
196
regioncx,
@@ -292,7 +292,7 @@ pub fn calculate_borrows_out_of_scope_at_location<'tcx>(
292
292
}
293
293
294
294
struct PoloniusOutOfScopePrecomputer < ' a , ' tcx > {
295
- visited : BitSet < mir:: BasicBlock > ,
295
+ visited : DenseBitSet < mir:: BasicBlock > ,
296
296
visit_stack : Vec < mir:: BasicBlock > ,
297
297
body : & ' a Body < ' tcx > ,
298
298
regioncx : & ' a RegionInferenceContext < ' tcx > ,
@@ -303,7 +303,7 @@ struct PoloniusOutOfScopePrecomputer<'a, 'tcx> {
303
303
impl < ' a , ' tcx > PoloniusOutOfScopePrecomputer < ' a , ' tcx > {
304
304
fn new ( body : & ' a Body < ' tcx > , regioncx : & ' a RegionInferenceContext < ' tcx > ) -> Self {
305
305
Self {
306
- visited : BitSet :: new_empty ( body. basic_blocks . len ( ) ) ,
306
+ visited : DenseBitSet :: new_empty ( body. basic_blocks . len ( ) ) ,
307
307
visit_stack : vec ! [ ] ,
308
308
body,
309
309
regioncx,
@@ -559,7 +559,7 @@ impl<'a, 'tcx> Borrows<'a, 'tcx> {
559
559
}
560
560
}
561
561
562
- type BorrowsDomain = BitSet < BorrowIndex > ;
562
+ type BorrowsDomain = DenseBitSet < BorrowIndex > ;
563
563
564
564
/// Forward dataflow computation of the set of borrows that are in scope at a particular location.
565
565
/// - we gen the introduced loans
@@ -575,7 +575,7 @@ impl<'tcx> rustc_mir_dataflow::Analysis<'tcx> for Borrows<'_, 'tcx> {
575
575
576
576
fn bottom_value ( & self , _: & mir:: Body < ' tcx > ) -> Self :: Domain {
577
577
// bottom = nothing is reserved or activated yet;
578
- BitSet :: new_empty ( self . borrow_set . len ( ) )
578
+ DenseBitSet :: new_empty ( self . borrow_set . len ( ) )
579
579
}
580
580
581
581
fn initialize_start_block ( & self , _: & mir:: Body < ' tcx > , _: & mut Self :: Domain ) {
0 commit comments