chore
This commit is contained in:
parent
79ed23ff81
commit
ce56cf71d9
2 changed files with 12 additions and 13 deletions
|
|
@ -724,3 +724,14 @@ pub fn for_each_local_assignment<'tcx, B>(
|
|||
ControlFlow::Continue(())
|
||||
}
|
||||
}
|
||||
|
||||
pub fn contains_break_or_continue(expr: &Expr<'_>) -> bool {
|
||||
for_each_expr(expr, |e| {
|
||||
if matches!(e.kind, ExprKind::Break(..) | ExprKind::Continue(..)) {
|
||||
ControlFlow::Break(())
|
||||
} else {
|
||||
ControlFlow::Continue(())
|
||||
}
|
||||
})
|
||||
.is_some()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue