]> git.lizzy.rs Git - rust.git/commitdiff
Update for latest master
authorOliver Schneider <git-spam-no-reply9815368754983@oli-obk.de>
Wed, 28 Jun 2017 09:02:27 +0000 (11:02 +0200)
committerOliver Schneider <git-spam-no-reply9815368754983@oli-obk.de>
Wed, 28 Jun 2017 09:02:27 +0000 (11:02 +0200)
clippy_lints/src/utils/higher.rs

index 7c7b3b57a11420b23267a8b713e0cf25b4da7b6e..d25f8e7df2b273ef37af2bee99587949e4fea0e5 100644 (file)
@@ -129,7 +129,7 @@ pub fn for_loop(expr: &hir::Expr) -> Option<(&hir::Pat, &hir::Expr, &hir::Expr)>
         iterargs.len() == 1 && arms.len() == 1 && arms[0].guard.is_none(),
         let hir::ExprLoop(ref block, _, _) = arms[0].body.node,
         block.expr.is_none(),
-        let [ ref let_stmt, ref body ] = *block.stmts,
+        let [ _, _, ref let_stmt, ref body ] = *block.stmts,
         let hir::StmtDecl(ref decl, _) = let_stmt.node,
         let hir::DeclLocal(ref decl) = decl.node,
         let hir::StmtExpr(ref expr, _) = body.node,