Skip to content

Commit 8e0a8c6

Browse files
committed
document StackEntry
NLLs have since removed its use, but polonius still currently makes use of it.
1 parent 39d8081 commit 8e0a8c6

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

compiler/rustc_borrowck/src/dataflow.rs

+4
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,10 @@ pub fn calculate_borrows_out_of_scope_at_location<'tcx>(
239239
prec.borrows_out_of_scope_at_location
240240
}
241241

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

0 commit comments

Comments
 (0)