Skip to content

Commit fe15611

Browse files
committed
Dump variable liveness in generator_interior.rs
This borrows some code from rust-lang#84333
1 parent 9ab2ed2 commit fe15611

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

compiler/rustc_typeck/src/check/generator_interior.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -341,17 +341,19 @@ impl<'a, 'tcx> Visitor<'tcx> for InteriorVisitor<'a, 'tcx> {
341341
ExprKind::Yield(..) => {
342342
let live_node = self.liveness.live_node(expr.hir_id, expr.span);
343343

344+
debug!("***Dumping variable liveness information***");
344345
for (_, &var) in self.liveness.ir.variable_map.iter() {
345346
if self.liveness.live_on_entry(live_node, var) {
346347
debug!(
347-
"Variable {:?} is live on entry at {:?}",
348+
" Variable {:?} is live on entry at {:?}",
348349
self.liveness.ir.variable_name(var),
349350
expr.span
350351
);
351352
}
352353
}
354+
debug!("***Done dumping variable liveness information***");
353355

354-
intravisit::walk_expr(self, expr)
356+
intravisit::walk_expr(self, expr);
355357
}
356358
_ => intravisit::walk_expr(self, expr),
357359
}

0 commit comments

Comments
 (0)