@@ -550,7 +550,7 @@ impl<'cx, 'gcx, 'tcx> DataflowResultsConsumer<'cx, 'tcx> for MirBorrowckCtxt<'cx
550550 if self . movable_generator {
551551 // Look for any active borrows to locals
552552 let borrow_set = self . borrow_set . clone ( ) ;
553- flow_state. borrows . with_iter_outgoing ( |borrows| {
553+ flow_state. with_outgoing_borrows ( |borrows| {
554554 for i in borrows {
555555 let borrow = & borrow_set[ i] ;
556556 self . check_for_local_borrow ( borrow, span) ;
@@ -565,7 +565,7 @@ impl<'cx, 'gcx, 'tcx> DataflowResultsConsumer<'cx, 'tcx> for MirBorrowckCtxt<'cx
565565 // StorageDead, but we don't always emit those (notably on unwind paths),
566566 // so this "extra check" serves as a kind of backup.
567567 let borrow_set = self . borrow_set . clone ( ) ;
568- flow_state. borrows . with_iter_outgoing ( |borrows| {
568+ flow_state. with_outgoing_borrows ( |borrows| {
569569 for i in borrows {
570570 let borrow = & borrow_set[ i] ;
571571 let context = ContextKind :: StorageDead . new ( loc) ;
@@ -2224,10 +2224,9 @@ impl<'cx, 'gcx, 'tcx> MirBorrowckCtxt<'cx, 'gcx, 'tcx> {
22242224 unreachable ! ( "iter::repeat returned None" )
22252225 }
22262226
2227- /// This function iterates over all of the current borrows
2228- /// (represented by 1-bits in `flow_state.borrows`) that conflict
2229- /// with an access to a place, invoking the `op` callback for each
2230- /// one.
2227+ /// This function iterates over all of the in-scope borrows that
2228+ /// conflict with an access to a place, invoking the `op` callback
2229+ /// for each one.
22312230 ///
22322231 /// "Current borrow" here means a borrow that reaches the point in
22332232 /// the control-flow where the access occurs.
@@ -2251,7 +2250,7 @@ impl<'cx, 'gcx, 'tcx> MirBorrowckCtxt<'cx, 'gcx, 'tcx> {
22512250 // check for loan restricting path P being used. Accounts for
22522251 // borrows of P, P.a.b, etc.
22532252 let borrow_set = self . borrow_set . clone ( ) ;
2254- for i in flow_state. borrows . iter_incoming ( ) {
2253+ for i in flow_state. borrows_in_scope ( ) {
22552254 let borrowed = & borrow_set[ i] ;
22562255
22572256 if self . places_conflict ( & borrowed. borrowed_place , place, access) {
0 commit comments