Skip to content

Commit 9d6c0fe

Browse files
committed
Rustup (fixes #2002)
1 parent c99b67c commit 9d6c0fe

16 files changed

+40
-19
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.155
5+
* Update to *rustc 1.21.0-nightly (c11f689d2 2017-08-29)*
6+
* New lint: [`infinite_iter`], [`maybe_infinite_iter`], [`cast_lossless`]
47

58
## 0.0.154
69
* Update to *rustc 1.21.0-nightly (2c0558f63 2017-08-24)*

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.154"
3+
version = "0.0.155"
44
authors = [
55
"Manish Goregaokar <[email protected]>",
66
"Andre Bogus <[email protected]>",
@@ -31,7 +31,7 @@ path = "src/main.rs"
3131

3232
[dependencies]
3333
# begin automatic update
34-
clippy_lints = { version = "0.0.154", path = "clippy_lints" }
34+
clippy_lints = { version = "0.0.155", 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.154"
4+
version = "0.0.155"
55
# end automatic update
66
authors = [
77
"Manish Goregaokar <[email protected]>",

clippy_lints/src/block_in_if_condition.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ struct ExVisitor<'a, 'tcx: 'a> {
5656

5757
impl<'a, 'tcx: 'a> Visitor<'tcx> for ExVisitor<'a, 'tcx> {
5858
fn visit_expr(&mut self, expr: &'tcx Expr) {
59-
if let ExprClosure(_, _, eid, _) = expr.node {
59+
if let ExprClosure(_, _, eid, _, _) = expr.node {
6060
let body = self.cx.tcx.hir.body(eid);
6161
let ex = &body.value;
6262
if matches!(ex.node, ExprBlock(_)) {

clippy_lints/src/bytecount.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for ByteCount {
4343
let ExprMethodCall(ref filter, _, ref filter_args) = count_args[0].node,
4444
filter.name == "filter",
4545
filter_args.len() == 2,
46-
let ExprClosure(_, _, body_id, _) = filter_args[1].node,
46+
let ExprClosure(_, _, body_id, _, _) = filter_args[1].node,
4747
], {
4848
let body = cx.tcx.hir.body(body_id);
4949
if_let_chain!([

clippy_lints/src/cyclomatic_complexity.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ impl<'a, 'tcx> Visitor<'tcx> for CCHelper<'a, 'tcx> {
171171
_ => (),
172172
}
173173
},
174-
ExprClosure(..) => (),
174+
ExprClosure(.., _) => (),
175175
ExprBinary(op, _, _) => {
176176
walk_expr(self, e);
177177
match op.node {

clippy_lints/src/eta_reduction.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for EtaPass {
4949
}
5050

5151
fn check_closure(cx: &LateContext, expr: &Expr) {
52-
if let ExprClosure(_, ref decl, eid, _) = expr.node {
52+
if let ExprClosure(_, ref decl, eid, _, _) = expr.node {
5353
let body = cx.tcx.hir.body(eid);
5454
let ex = &body.value;
5555
if let ExprCall(ref caller, ref args) = ex.node {

clippy_lints/src/eval_order_dependence.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ struct DivergenceVisitor<'a, 'tcx: 'a> {
104104
impl<'a, 'tcx> DivergenceVisitor<'a, 'tcx> {
105105
fn maybe_walk_expr(&mut self, e: &'tcx Expr) {
106106
match e.node {
107-
ExprClosure(..) => {},
107+
ExprClosure(.., _) => {},
108108
ExprMatch(ref e, ref arms, _) => {
109109
self.visit_expr(e);
110110
for arm in arms {
@@ -239,7 +239,7 @@ fn check_expr<'a, 'tcx>(vis: &mut ReadVisitor<'a, 'tcx>, expr: &'tcx Expr) -> St
239239
walk_expr(vis, expr);
240240
}
241241
},
242-
ExprClosure(_, _, _, _) => {
242+
ExprClosure(_, _, _, _, _) => {
243243
// Either
244244
//
245245
// * `var` is defined in the closure body, in which case we've
@@ -323,7 +323,7 @@ impl<'a, 'tcx> Visitor<'tcx> for ReadVisitor<'a, 'tcx> {
323323
// We're about to descend a closure. Since we don't know when (or
324324
// if) the closure will be evaluated, any reads in it might not
325325
// occur here (or ever). Like above, bail to avoid false positives.
326-
ExprClosure(_, _, _, _) |
326+
ExprClosure(_, _, _, _, _) |
327327

328328
// We want to avoid a false positive when a variable name occurs
329329
// only to have its address taken, so we stop here. Technically,

clippy_lints/src/infinite_iter.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ fn is_infinite(cx: &LateContext, expr: &Expr) -> Finiteness {
148148
}
149149
}
150150
if method.name == "flat_map" && args.len() == 2 {
151-
if let ExprClosure(_, _, body_id, _) = args[1].node {
151+
if let ExprClosure(_, _, body_id, _, _) = args[1].node {
152152
let body = cx.tcx.hir.body(body_id);
153153
return is_infinite(cx, &body.value);
154154
}

clippy_lints/src/map_clone.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Pass {
3131
if let ExprMethodCall(ref method, _, ref args) = expr.node {
3232
if method.name == "map" && args.len() == 2 {
3333
match args[1].node {
34-
ExprClosure(_, ref decl, closure_eid, _) => {
34+
ExprClosure(_, ref decl, closure_eid, _, _) => {
3535
let body = cx.tcx.hir.body(closure_eid);
3636
let closure_expr = remove_blocks(&body.value);
3737
let ty = cx.tables.pat_ty(&body.arguments[0].pat);

0 commit comments

Comments
 (0)