rustc_borrowck::path_utils

Function each_borrow_involving_path

Source
pub(crate) fn each_borrow_involving_path<'tcx, F, I, S>(
    s: &mut S,
    tcx: TyCtxt<'tcx>,
    body: &Body<'tcx>,
    access_place: (AccessDepth, Place<'tcx>),
    borrow_set: &BorrowSet<'tcx>,
    is_candidate: I,
    op: F,
)
where F: FnMut(&mut S, BorrowIndex, &BorrowData<'tcx>) -> Control, I: Fn(BorrowIndex) -> bool,
Expand description

Encapsulates the idea of iterating over every borrow that involves a particular path