1
Fork 0

Auto merge of #114170 - lcnr:add-commmentz, r=compiler-errors

add `dropck_outlives` comments
This commit is contained in:
bors 2023-08-02 02:45:47 +00:00
commit 90bb4184f8
2 changed files with 6 additions and 12 deletions

View file

@ -161,8 +161,12 @@ impl<'me, 'typeck, 'flow, 'tcx> LivenessResults<'me, 'typeck, 'flow, 'tcx> {
}
}
// Runs dropck for locals whose liveness isn't relevant. This is
// necessary to eagerly detect unbound recursion during drop glue computation.
/// Runs dropck for locals whose liveness isn't relevant. This is
/// necessary to eagerly detect unbound recursion during drop glue computation.
///
/// These are all the locals which do not potentially reference a region local
/// to this body. Locals which only reference free regions are always drop-live
/// and can therefore safely be dropped.
fn dropck_boring_locals(&mut self, boring_locals: Vec<Local>) {
for local in boring_locals {
let local_ty = self.cx.body.local_decls[local].ty;