parent
cd138dc447
commit
d8074e65b0
9 changed files with 32 additions and 23 deletions
|
@ -284,7 +284,7 @@ impl<'a, 'tcx> CFGBuilder<'a, 'tcx> {
|
|||
}
|
||||
|
||||
hir::ExprBreak(label) => {
|
||||
let loop_scope = self.find_scope(expr, label);
|
||||
let loop_scope = self.find_scope(expr, label.map(|l| l.node));
|
||||
let b = self.add_ast_node(expr.id, &[pred]);
|
||||
self.add_exiting_edge(expr, b,
|
||||
loop_scope, loop_scope.break_index);
|
||||
|
@ -292,7 +292,7 @@ impl<'a, 'tcx> CFGBuilder<'a, 'tcx> {
|
|||
}
|
||||
|
||||
hir::ExprAgain(label) => {
|
||||
let loop_scope = self.find_scope(expr, label);
|
||||
let loop_scope = self.find_scope(expr, label.map(|l| l.node));
|
||||
let a = self.add_ast_node(expr.id, &[pred]);
|
||||
self.add_exiting_edge(expr, a,
|
||||
loop_scope, loop_scope.continue_index);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue