Skip to content

Commit

Permalink
document StackEntry
Browse files Browse the repository at this point in the history
NLLs have since removed its use, but polonius still currently makes use
of it.
  • Loading branch information
lqd committed Sep 1, 2023
1 parent 39d8081 commit 8e0a8c6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions compiler/rustc_borrowck/src/dataflow.rs
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,10 @@ pub fn calculate_borrows_out_of_scope_at_location<'tcx>(
prec.borrows_out_of_scope_at_location
}

/// An entry in the CFG walk stack of the scope computation, recording visited statements within a
/// block, in case of cycles requiring revisiting the same block but at earlier points.
// FIXME: `precompute_borrows_out_of_scope` has stopped using this structure, and a similar
// reorganizing of `precompute_loans_out_of_scope` could also avoid it.
struct StackEntry {
bb: mir::BasicBlock,
lo: usize,
Expand Down

0 comments on commit 8e0a8c6

Please sign in to comment.