@@ -533,7 +533,7 @@ impl<'tcx> LateLintPass<'tcx> for Loops {
533533 }
534534
535535 // check for never_loop
536- if let ExprKind :: Loop ( ref block, _, _) = expr. kind {
536+ if let ExprKind :: Loop ( ref block, _, _, _ ) = expr. kind {
537537 match never_loop_block ( block, expr. hir_id ) {
538538 NeverLoopResult :: AlwaysBreak => span_lint ( cx, NEVER_LOOP , expr. span , "this loop never actually loops" ) ,
539539 NeverLoopResult :: MayContinueMainLoop | NeverLoopResult :: Otherwise => ( ) ,
@@ -543,7 +543,7 @@ impl<'tcx> LateLintPass<'tcx> for Loops {
543543 // check for `loop { if let {} else break }` that could be `while let`
544544 // (also matches an explicit "match" instead of "if let")
545545 // (even if the "match" or "if let" is used for declaration)
546- if let ExprKind :: Loop ( ref block, _, LoopSource :: Loop ) = expr. kind {
546+ if let ExprKind :: Loop ( ref block, _, LoopSource :: Loop , _ ) = expr. kind {
547547 // also check for empty `loop {}` statements, skipping those in #[panic_handler]
548548 if block. stmts . is_empty ( ) && block. expr . is_none ( ) && !is_in_panic_handler ( cx, expr) {
549549 let msg = "empty `loop {}` wastes CPU cycles" ;
@@ -738,7 +738,7 @@ fn never_loop_expr(expr: &Expr<'_>, main_loop_id: HirId) -> NeverLoopResult {
738738 | ExprKind :: Assign ( ref e1, ref e2, _)
739739 | ExprKind :: AssignOp ( _, ref e1, ref e2)
740740 | ExprKind :: Index ( ref e1, ref e2) => never_loop_expr_all ( & mut [ & * * e1, & * * e2] . iter ( ) . cloned ( ) , main_loop_id) ,
741- ExprKind :: Loop ( ref b, _, _) => {
741+ ExprKind :: Loop ( ref b, _, _, _ ) => {
742742 // Break can come from the inner loop so remove them.
743743 absorb_break ( & never_loop_block ( b, main_loop_id) )
744744 } ,
@@ -1314,7 +1314,7 @@ impl<'a, 'tcx> Visitor<'tcx> for SameItemPushVisitor<'a, 'tcx> {
13141314 fn visit_expr ( & mut self , expr : & ' tcx Expr < ' _ > ) {
13151315 match & expr. kind {
13161316 // Non-determinism may occur ... don't give a lint
1317- ExprKind :: Loop ( _ , _ , _ ) | ExprKind :: Match ( _ , _ , _ ) => self . should_lint = false ,
1317+ ExprKind :: Loop ( .. ) | ExprKind :: Match ( .. ) => self . should_lint = false ,
13181318 ExprKind :: Block ( block, _) => self . visit_block ( block) ,
13191319 _ => { } ,
13201320 }
0 commit comments