Skip to content

Commit 329ddb9

Browse files
authored
Merge pull request #1814 from Manishearth/rustup
Rustup to *rustc 1.19.0-nightly (0418fa9 2017-06-04)*
2 parents 5a6e48f + a7cbc9c commit 329ddb9

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# Change Log
22
All notable changes to this project will be documented in this file.
33

4+
## 0.0.138 — 2017-06-05
5+
* Update to *rustc 1.19.0-nightly (0418fa9d3 2017-06-04)*
6+
47
## 0.0.137 — 2017-06-05
58
* Update to *rustc 1.19.0-nightly (6684d176c 2017-06-03)*
69

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "clippy"
3-
version = "0.0.137"
3+
version = "0.0.138"
44
authors = [
55
"Manish Goregaokar <[email protected]>",
66
"Andre Bogus <[email protected]>",
@@ -31,7 +31,7 @@ test = false
3131

3232
[dependencies]
3333
# begin automatic update
34-
clippy_lints = { version = "0.0.137", path = "clippy_lints" }
34+
clippy_lints = { version = "0.0.138", path = "clippy_lints" }
3535
# end automatic update
3636
cargo_metadata = "0.2"
3737

clippy_lints/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "clippy_lints"
33
# begin automatic update
4-
version = "0.0.137"
4+
version = "0.0.138"
55
# end automatic update
66
authors = [
77
"Manish Goregaokar <[email protected]>",

clippy_lints/src/utils/higher.rs

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -129,16 +129,13 @@ pub fn for_loop(expr: &hir::Expr) -> Option<(&hir::Pat, &hir::Expr, &hir::Expr)>
129129
let hir::ExprCall(_, ref iterargs) = iterexpr.node,
130130
iterargs.len() == 1 && arms.len() == 1 && arms[0].guard.is_none(),
131131
let hir::ExprLoop(ref block, _, _) = arms[0].body.node,
132-
block.stmts.is_empty(),
133-
let Some(ref loopexpr) = block.expr,
134-
let hir::ExprMatch(_, ref innerarms, hir::MatchSource::ForLoopDesugar) = loopexpr.node,
135-
innerarms.len() == 2 && innerarms[0].pats.len() == 1,
136-
let hir::PatKind::TupleStruct(_, ref somepats, _) = innerarms[0].pats[0].node,
137-
somepats.len() == 1
132+
block.expr.is_none(),
133+
let [ ref let_stmt, ref body ] = *block.stmts,
134+
let hir::StmtDecl(ref decl, _) = let_stmt.node,
135+
let hir::DeclLocal(ref decl) = decl.node,
136+
let hir::StmtExpr(ref expr, _) = body.node,
138137
], {
139-
return Some((&somepats[0],
140-
&iterargs[0],
141-
&innerarms[0].body));
138+
return Some((&*decl.pat, &iterargs[0], expr));
142139
}}
143140
None
144141
}

0 commit comments

Comments
 (0)