rustfmt
This commit is contained in:
parent
adcc02ed8a
commit
c72be0f65a
@ -483,9 +483,7 @@ fn check_expr(&mut self, cx: &LateContext<'a, 'tcx>, expr: &'tcx Expr) {
|
|||||||
// check for never_loop
|
// check for never_loop
|
||||||
if let ExprKind::Loop(ref block, _, _) = expr.node {
|
if let ExprKind::Loop(ref block, _, _) = expr.node {
|
||||||
match never_loop_block(block, expr.hir_id) {
|
match never_loop_block(block, expr.hir_id) {
|
||||||
NeverLoopResult::AlwaysBreak => {
|
NeverLoopResult::AlwaysBreak => span_lint(cx, NEVER_LOOP, expr.span, "this loop never actually loops"),
|
||||||
span_lint(cx, NEVER_LOOP, expr.span, "this loop never actually loops")
|
|
||||||
},
|
|
||||||
NeverLoopResult::MayContinueMainLoop | NeverLoopResult::Otherwise => (),
|
NeverLoopResult::MayContinueMainLoop | NeverLoopResult::Otherwise => (),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user