@@ -550,7 +550,7 @@ impl<'cx, 'gcx, 'tcx> DataflowResultsConsumer<'cx, 'tcx> for MirBorrowckCtxt<'cx
550
550
if self . movable_generator {
551
551
// Look for any active borrows to locals
552
552
let borrow_set = self . borrow_set . clone ( ) ;
553
- flow_state. borrows . with_iter_outgoing ( |borrows| {
553
+ flow_state. with_outgoing_borrows ( |borrows| {
554
554
for i in borrows {
555
555
let borrow = & borrow_set[ i] ;
556
556
self . check_for_local_borrow ( borrow, span) ;
@@ -565,7 +565,7 @@ impl<'cx, 'gcx, 'tcx> DataflowResultsConsumer<'cx, 'tcx> for MirBorrowckCtxt<'cx
565
565
// StorageDead, but we don't always emit those (notably on unwind paths),
566
566
// so this "extra check" serves as a kind of backup.
567
567
let borrow_set = self . borrow_set . clone ( ) ;
568
- flow_state. borrows . with_iter_outgoing ( |borrows| {
568
+ flow_state. with_outgoing_borrows ( |borrows| {
569
569
for i in borrows {
570
570
let borrow = & borrow_set[ i] ;
571
571
let context = ContextKind :: StorageDead . new ( loc) ;
@@ -2224,10 +2224,9 @@ impl<'cx, 'gcx, 'tcx> MirBorrowckCtxt<'cx, 'gcx, 'tcx> {
2224
2224
unreachable ! ( "iter::repeat returned None" )
2225
2225
}
2226
2226
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.
2231
2230
///
2232
2231
/// "Current borrow" here means a borrow that reaches the point in
2233
2232
/// the control-flow where the access occurs.
@@ -2251,7 +2250,7 @@ impl<'cx, 'gcx, 'tcx> MirBorrowckCtxt<'cx, 'gcx, 'tcx> {
2251
2250
// check for loan restricting path P being used. Accounts for
2252
2251
// borrows of P, P.a.b, etc.
2253
2252
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 ( ) {
2255
2254
let borrowed = & borrow_set[ i] ;
2256
2255
2257
2256
if self . places_conflict ( & borrowed. borrowed_place , place, access) {
0 commit comments