Merge pull request #1814 from Manishearth/rustup

Rustup to *rustc 1.19.0-nightly (0418fa9d3 2017-06-04)*
This commit is contained in:
Martin Carton 2017-06-05 23:15:20 +02:00 committed by GitHub
commit 329ddb98e1
4 changed files with 12 additions and 12 deletions

View file

@ -1,6 +1,9 @@
# Change Log # Change Log
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
## 0.0.138 — 2017-06-05
* Update to *rustc 1.19.0-nightly (0418fa9d3 2017-06-04)*
## 0.0.137 — 2017-06-05 ## 0.0.137 — 2017-06-05
* Update to *rustc 1.19.0-nightly (6684d176c 2017-06-03)* * Update to *rustc 1.19.0-nightly (6684d176c 2017-06-03)*

View file

@ -1,6 +1,6 @@
[package] [package]
name = "clippy" name = "clippy"
version = "0.0.137" version = "0.0.138"
authors = [ authors = [
"Manish Goregaokar <manishsmail@gmail.com>", "Manish Goregaokar <manishsmail@gmail.com>",
"Andre Bogus <bogusandre@gmail.com>", "Andre Bogus <bogusandre@gmail.com>",
@ -31,7 +31,7 @@ test = false
[dependencies] [dependencies]
# begin automatic update # begin automatic update
clippy_lints = { version = "0.0.137", path = "clippy_lints" } clippy_lints = { version = "0.0.138", path = "clippy_lints" }
# end automatic update # end automatic update
cargo_metadata = "0.2" cargo_metadata = "0.2"

View file

@ -1,7 +1,7 @@
[package] [package]
name = "clippy_lints" name = "clippy_lints"
# begin automatic update # begin automatic update
version = "0.0.137" version = "0.0.138"
# end automatic update # end automatic update
authors = [ authors = [
"Manish Goregaokar <manishsmail@gmail.com>", "Manish Goregaokar <manishsmail@gmail.com>",

View file

@ -129,16 +129,13 @@ pub fn for_loop(expr: &hir::Expr) -> Option<(&hir::Pat, &hir::Expr, &hir::Expr)>
let hir::ExprCall(_, ref iterargs) = iterexpr.node, let hir::ExprCall(_, ref iterargs) = iterexpr.node,
iterargs.len() == 1 && arms.len() == 1 && arms[0].guard.is_none(), iterargs.len() == 1 && arms.len() == 1 && arms[0].guard.is_none(),
let hir::ExprLoop(ref block, _, _) = arms[0].body.node, let hir::ExprLoop(ref block, _, _) = arms[0].body.node,
block.stmts.is_empty(), block.expr.is_none(),
let Some(ref loopexpr) = block.expr, let [ ref let_stmt, ref body ] = *block.stmts,
let hir::ExprMatch(_, ref innerarms, hir::MatchSource::ForLoopDesugar) = loopexpr.node, let hir::StmtDecl(ref decl, _) = let_stmt.node,
innerarms.len() == 2 && innerarms[0].pats.len() == 1, let hir::DeclLocal(ref decl) = decl.node,
let hir::PatKind::TupleStruct(_, ref somepats, _) = innerarms[0].pats[0].node, let hir::StmtExpr(ref expr, _) = body.node,
somepats.len() == 1
], { ], {
return Some((&somepats[0], return Some((&*decl.pat, &iterargs[0], expr));
&iterargs[0],
&innerarms[0].body));
}} }}
None None
} }