@@ -2,7 +2,7 @@ use std::fmt;
22
33use  rustc_data_structures:: fx:: FxIndexMap ; 
44use  rustc_data_structures:: graph; 
5- use  rustc_index:: bit_set:: BitSet ; 
5+ use  rustc_index:: bit_set:: DenseBitSet ; 
66use  rustc_middle:: mir:: { 
77    self ,  BasicBlock ,  Body ,  CallReturnPlaces ,  Location ,  Place ,  TerminatorEdges , 
88} ; 
@@ -180,7 +180,7 @@ pub struct Borrows<'a, 'tcx> {
180180} 
181181
182182struct  OutOfScopePrecomputer < ' a ,  ' tcx >  { 
183-     visited :  BitSet < mir:: BasicBlock > , 
183+     visited :  DenseBitSet < mir:: BasicBlock > , 
184184    visit_stack :  Vec < mir:: BasicBlock > , 
185185    body :  & ' a  Body < ' tcx > , 
186186    regioncx :  & ' a  RegionInferenceContext < ' tcx > , 
@@ -190,7 +190,7 @@ struct OutOfScopePrecomputer<'a, 'tcx> {
190190impl < ' a ,  ' tcx >  OutOfScopePrecomputer < ' a ,  ' tcx >  { 
191191    fn  new ( body :  & ' a  Body < ' tcx > ,  regioncx :  & ' a  RegionInferenceContext < ' tcx > )  -> Self  { 
192192        OutOfScopePrecomputer  { 
193-             visited :  BitSet :: new_empty ( body. basic_blocks . len ( ) ) , 
193+             visited :  DenseBitSet :: new_empty ( body. basic_blocks . len ( ) ) , 
194194            visit_stack :  vec ! [ ] , 
195195            body, 
196196            regioncx, 
@@ -292,7 +292,7 @@ pub fn calculate_borrows_out_of_scope_at_location<'tcx>(
292292} 
293293
294294struct  PoloniusOutOfScopePrecomputer < ' a ,  ' tcx >  { 
295-     visited :  BitSet < mir:: BasicBlock > , 
295+     visited :  DenseBitSet < mir:: BasicBlock > , 
296296    visit_stack :  Vec < mir:: BasicBlock > , 
297297    body :  & ' a  Body < ' tcx > , 
298298    regioncx :  & ' a  RegionInferenceContext < ' tcx > , 
@@ -303,7 +303,7 @@ struct PoloniusOutOfScopePrecomputer<'a, 'tcx> {
303303impl < ' a ,  ' tcx >  PoloniusOutOfScopePrecomputer < ' a ,  ' tcx >  { 
304304    fn  new ( body :  & ' a  Body < ' tcx > ,  regioncx :  & ' a  RegionInferenceContext < ' tcx > )  -> Self  { 
305305        Self  { 
306-             visited :  BitSet :: new_empty ( body. basic_blocks . len ( ) ) , 
306+             visited :  DenseBitSet :: new_empty ( body. basic_blocks . len ( ) ) , 
307307            visit_stack :  vec ! [ ] , 
308308            body, 
309309            regioncx, 
@@ -559,7 +559,7 @@ impl<'a, 'tcx> Borrows<'a, 'tcx> {
559559    } 
560560} 
561561
562- type  BorrowsDomain  = BitSet < BorrowIndex > ; 
562+ type  BorrowsDomain  = DenseBitSet < BorrowIndex > ; 
563563
564564/// Forward dataflow computation of the set of borrows that are in scope at a particular location. 
565565/// - we gen the introduced loans 
@@ -575,7 +575,7 @@ impl<'tcx> rustc_mir_dataflow::Analysis<'tcx> for Borrows<'_, 'tcx> {
575575
576576    fn  bottom_value ( & self ,  _:  & mir:: Body < ' tcx > )  -> Self :: Domain  { 
577577        // bottom = nothing is reserved or activated yet; 
578-         BitSet :: new_empty ( self . borrow_set . len ( ) ) 
578+         DenseBitSet :: new_empty ( self . borrow_set . len ( ) ) 
579579    } 
580580
581581    fn  initialize_start_block ( & self ,  _:  & mir:: Body < ' tcx > ,  _:  & mut  Self :: Domain )  { 
0 commit comments