Skip to content

Commit 752900c

Browse files
Cameron SteffenCameron Steffen
authored andcommitted
change expect message
1 parent 9ccb710 commit 752900c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

clippy_lints/src/loops.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -567,12 +567,12 @@ fn never_loop_expr(expr: &Expr, state: &mut NeverLoopState) -> bool {
567567
},
568568
ExprBlock(ref b) => never_loop_block(b, state),
569569
ExprAgain(d) => {
570-
let id = d.target_id.opt_id().expect("continue is missing target id");
570+
let id = d.target_id.opt_id().expect("target id can only be missing in the presence of compilation errors");
571571
state.continues.insert(id);
572572
false
573573
},
574574
ExprBreak(d, _) => {
575-
let id = d.target_id.opt_id().expect("break is missing target id");
575+
let id = d.target_id.opt_id().expect("target id can only be missing in the presence of compilation errors");
576576
state.breaks.insert(id);
577577
false
578578
},

0 commit comments

Comments
 (0)