File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
src/librustc_mir/borrow_check/nll/region_infer Expand file tree Collapse file tree 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> {
467467 let mut inferred_values = self . liveness_constraints . clone ( ) ;
468468
469469 let dependency_map = self . build_dependency_map ( ) ;
470+
471+ // Constraints that may need to be repropagated (initially all):
470472 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 ( ) ) ;
472476
473477 debug ! ( "propagate_constraints: --------------------" ) ;
474478 while let Some ( constraint_idx) = dirty_list. pop ( ) {
475- dirty_bit_vec . remove ( constraint_idx) ;
479+ clean_bit_vec . insert ( constraint_idx) ;
476480
477481 let constraint = & self . constraints [ constraint_idx] ;
478482 debug ! ( "propagate_constraints: constraint={:?}" , constraint) ;
@@ -495,7 +499,7 @@ impl<'tcx> RegionInferenceContext<'tcx> {
495499 debug ! ( "propagate_constraints: sup={:?}" , constraint. sup) ;
496500
497501 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) {
499503 dirty_list. push ( dep_idx) ;
500504 }
501505 }
You can’t perform that action at this time.
0 commit comments