File tree 1 file changed +7
-3
lines changed
src/librustc_mir/borrow_check/nll/region_infer
1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -467,12 +467,16 @@ impl<'tcx> RegionInferenceContext<'tcx> {
467
467
let mut inferred_values = self . liveness_constraints . clone ( ) ;
468
468
469
469
let dependency_map = self . build_dependency_map ( ) ;
470
+
471
+ // Constraints that may need to be repropagated (initially all):
470
472
let mut dirty_list: Vec < _ > = ( 0 ..self . constraints . len ( ) ) . collect ( ) ;
471
- let mut dirty_bit_vec = BitVector :: new ( dirty_list. len ( ) ) ;
473
+
474
+ // Set to 0 for each constraint that is on the dirty list:
475
+ let mut clean_bit_vec = BitVector :: new ( dirty_list. len ( ) ) ;
472
476
473
477
debug ! ( "propagate_constraints: --------------------" ) ;
474
478
while let Some ( constraint_idx) = dirty_list. pop ( ) {
475
- dirty_bit_vec . remove ( constraint_idx) ;
479
+ clean_bit_vec . insert ( constraint_idx) ;
476
480
477
481
let constraint = & self . constraints [ constraint_idx] ;
478
482
debug ! ( "propagate_constraints: constraint={:?}" , constraint) ;
@@ -495,7 +499,7 @@ impl<'tcx> RegionInferenceContext<'tcx> {
495
499
debug ! ( "propagate_constraints: sup={:?}" , constraint. sup) ;
496
500
497
501
for & dep_idx in dependency_map. get ( & constraint. sup ) . unwrap_or ( & vec ! [ ] ) {
498
- if dirty_bit_vec . insert ( dep_idx) {
502
+ if clean_bit_vec . remove ( dep_idx) {
499
503
dirty_list. push ( dep_idx) ;
500
504
}
501
505
}
You can’t perform that action at this time.
0 commit comments