@@ -549,7 +549,7 @@ impl<'cx, 'gcx, 'tcx> DataflowResultsConsumer<'cx, 'tcx> for MirBorrowckCtxt<'cx
549
549
if self . movable_generator {
550
550
// Look for any active borrows to locals
551
551
let borrow_set = self . borrow_set . clone ( ) ;
552
- flow_state. borrows . with_iter_outgoing ( |borrows| {
552
+ flow_state. with_outgoing_borrows ( |borrows| {
553
553
for i in borrows {
554
554
let borrow = & borrow_set[ i] ;
555
555
self . check_for_local_borrow ( borrow, span) ;
@@ -564,7 +564,7 @@ impl<'cx, 'gcx, 'tcx> DataflowResultsConsumer<'cx, 'tcx> for MirBorrowckCtxt<'cx
564
564
// StorageDead, but we don't always emit those (notably on unwind paths),
565
565
// so this "extra check" serves as a kind of backup.
566
566
let borrow_set = self . borrow_set . clone ( ) ;
567
- flow_state. borrows . with_iter_outgoing ( |borrows| {
567
+ flow_state. with_outgoing_borrows ( |borrows| {
568
568
for i in borrows {
569
569
let borrow = & borrow_set[ i] ;
570
570
let context = ContextKind :: StorageDead . new ( loc) ;
@@ -2168,10 +2168,9 @@ impl<'cx, 'gcx, 'tcx> MirBorrowckCtxt<'cx, 'gcx, 'tcx> {
2168
2168
unreachable ! ( "iter::repeat returned None" )
2169
2169
}
2170
2170
2171
- /// This function iterates over all of the current borrows
2172
- /// (represented by 1-bits in `flow_state.borrows`) that conflict
2173
- /// with an access to a place, invoking the `op` callback for each
2174
- /// one.
2171
+ /// This function iterates over all of the in-scope borrows that
2172
+ /// conflict with an access to a place, invoking the `op` callback
2173
+ /// for each one.
2175
2174
///
2176
2175
/// "Current borrow" here means a borrow that reaches the point in
2177
2176
/// the control-flow where the access occurs.
@@ -2195,7 +2194,7 @@ impl<'cx, 'gcx, 'tcx> MirBorrowckCtxt<'cx, 'gcx, 'tcx> {
2195
2194
// check for loan restricting path P being used. Accounts for
2196
2195
// borrows of P, P.a.b, etc.
2197
2196
let borrow_set = self . borrow_set . clone ( ) ;
2198
- for i in flow_state. borrows . iter_incoming ( ) {
2197
+ for i in flow_state. borrows_in_scope ( ) {
2199
2198
let borrowed = & borrow_set[ i] ;
2200
2199
2201
2200
if self . places_conflict ( & borrowed. borrowed_place , place, access) {
0 commit comments