We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9ccb710 commit 752900cCopy full SHA for 752900c
clippy_lints/src/loops.rs
@@ -567,12 +567,12 @@ fn never_loop_expr(expr: &Expr, state: &mut NeverLoopState) -> bool {
567
},
568
ExprBlock(ref b) => never_loop_block(b, state),
569
ExprAgain(d) => {
570
- let id = d.target_id.opt_id().expect("continue is missing target id");
+ let id = d.target_id.opt_id().expect("target id can only be missing in the presence of compilation errors");
571
state.continues.insert(id);
572
false
573
574
ExprBreak(d, _) => {
575
- let id = d.target_id.opt_id().expect("break is missing target id");
576
state.breaks.insert(id);
577
578
0 commit comments