Skip to content

Commit

Permalink
Add some doc to each_borrow_involving_path iteration function.
Browse files Browse the repository at this point in the history
  • Loading branch information
pnkfelix committed Dec 13, 2017
1 parent ced5a70 commit 658ed79
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/librustc_mir/borrow_check/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1796,6 +1796,18 @@ impl<'cx, 'gcx, 'tcx> MirBorrowckCtxt<'cx, 'gcx, 'tcx> {
unreachable!("iter::repeat returned None")
}

/// This function iterates over all of the current borrows
/// (represented by 1-bits in `flow_state.borrows`) that conflict
/// with an access to a place, invoking the `op` callback for each
/// one.
///
/// "Current borrow" here means a borrow that reaches the point in
/// the control-flow where the access occurs.
///
/// The borrow's phase is represented by the ReserveOrActivateIndex
/// passed to the callback: one can call `is_reservation()` and
/// `is_activation()` to determine what phase the borrow is
/// currently in, when such distinction matters.
fn each_borrow_involving_path<F>(
&mut self,
_context: Context,
Expand Down

0 comments on commit 658ed79

Please sign in to comment.