Rustup (fixes #2002)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 01c0766..0ca0490 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,6 +1,9 @@
 # Change Log
 All notable changes to this project will be documented in this file.
 
+## 0.0.155
+* Update to *rustc 1.21.0-nightly (c11f689d2 2017-08-29)*
+* New lint: [`infinite_iter`], [`maybe_infinite_iter`], [`cast_lossless`]
 
 ## 0.0.154
 * Update to *rustc 1.21.0-nightly (2c0558f63 2017-08-24)*
diff --git a/Cargo.toml b/Cargo.toml
index 914d453..6ecfa3d 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
 [package]
 name = "clippy"
-version = "0.0.154"
+version = "0.0.155"
 authors = [
 	"Manish Goregaokar <manishsmail@gmail.com>",
 	"Andre Bogus <bogusandre@gmail.com>",
@@ -31,7 +31,7 @@
 
 [dependencies]
 # begin automatic update
-clippy_lints = { version = "0.0.154", path = "clippy_lints" }
+clippy_lints = { version = "0.0.155", path = "clippy_lints" }
 # end automatic update
 cargo_metadata = "0.2"
 
diff --git a/clippy_lints/Cargo.toml b/clippy_lints/Cargo.toml
index 8cdbbaa..7aae50a 100644
--- a/clippy_lints/Cargo.toml
+++ b/clippy_lints/Cargo.toml
@@ -1,7 +1,7 @@
 [package]
 name = "clippy_lints"
 # begin automatic update
-version = "0.0.154"
+version = "0.0.155"
 # end automatic update
 authors = [
 	"Manish Goregaokar <manishsmail@gmail.com>",
diff --git a/clippy_lints/src/block_in_if_condition.rs b/clippy_lints/src/block_in_if_condition.rs
index eea4439..82a3eb0 100644
--- a/clippy_lints/src/block_in_if_condition.rs
+++ b/clippy_lints/src/block_in_if_condition.rs
@@ -56,7 +56,7 @@
 
 impl<'a, 'tcx: 'a> Visitor<'tcx> for ExVisitor<'a, 'tcx> {
     fn visit_expr(&mut self, expr: &'tcx Expr) {
-        if let ExprClosure(_, _, eid, _) = expr.node {
+        if let ExprClosure(_, _, eid, _, _) = expr.node {
             let body = self.cx.tcx.hir.body(eid);
             let ex = &body.value;
             if matches!(ex.node, ExprBlock(_)) {
diff --git a/clippy_lints/src/bytecount.rs b/clippy_lints/src/bytecount.rs
index cbd0c6d..a3a53b6 100644
--- a/clippy_lints/src/bytecount.rs
+++ b/clippy_lints/src/bytecount.rs
@@ -43,7 +43,7 @@
             let ExprMethodCall(ref filter, _, ref filter_args) = count_args[0].node,
             filter.name == "filter",
             filter_args.len() == 2,
-            let ExprClosure(_, _, body_id, _) = filter_args[1].node,
+            let ExprClosure(_, _, body_id, _, _) = filter_args[1].node,
         ], {
             let body = cx.tcx.hir.body(body_id);
             if_let_chain!([
diff --git a/clippy_lints/src/cyclomatic_complexity.rs b/clippy_lints/src/cyclomatic_complexity.rs
index 9596e98..edfa5e0 100644
--- a/clippy_lints/src/cyclomatic_complexity.rs
+++ b/clippy_lints/src/cyclomatic_complexity.rs
@@ -171,7 +171,7 @@
                     _ => (),
                 }
             },
-            ExprClosure(..) => (),
+            ExprClosure(.., _) => (),
             ExprBinary(op, _, _) => {
                 walk_expr(self, e);
                 match op.node {
diff --git a/clippy_lints/src/eta_reduction.rs b/clippy_lints/src/eta_reduction.rs
index b5667db..42524da 100644
--- a/clippy_lints/src/eta_reduction.rs
+++ b/clippy_lints/src/eta_reduction.rs
@@ -49,7 +49,7 @@
 }
 
 fn check_closure(cx: &LateContext, expr: &Expr) {
-    if let ExprClosure(_, ref decl, eid, _) = expr.node {
+    if let ExprClosure(_, ref decl, eid, _, _) = expr.node {
         let body = cx.tcx.hir.body(eid);
         let ex = &body.value;
         if let ExprCall(ref caller, ref args) = ex.node {
diff --git a/clippy_lints/src/eval_order_dependence.rs b/clippy_lints/src/eval_order_dependence.rs
index 549b621..db952cd 100644
--- a/clippy_lints/src/eval_order_dependence.rs
+++ b/clippy_lints/src/eval_order_dependence.rs
@@ -104,7 +104,7 @@
 impl<'a, 'tcx> DivergenceVisitor<'a, 'tcx> {
     fn maybe_walk_expr(&mut self, e: &'tcx Expr) {
         match e.node {
-            ExprClosure(..) => {},
+            ExprClosure(.., _) => {},
             ExprMatch(ref e, ref arms, _) => {
                 self.visit_expr(e);
                 for arm in arms {
@@ -239,7 +239,7 @@
                 walk_expr(vis, expr);
             }
         },
-        ExprClosure(_, _, _, _) => {
+        ExprClosure(_, _, _, _, _) => {
             // Either
             //
             // * `var` is defined in the closure body, in which case we've
@@ -323,7 +323,7 @@
             // We're about to descend a closure. Since we don't know when (or
             // if) the closure will be evaluated, any reads in it might not
             // occur here (or ever). Like above, bail to avoid false positives.
-            ExprClosure(_, _, _, _) |
+            ExprClosure(_, _, _, _, _) |
 
             // We want to avoid a false positive when a variable name occurs
             // only to have its address taken, so we stop here. Technically,
diff --git a/clippy_lints/src/infinite_iter.rs b/clippy_lints/src/infinite_iter.rs
index 72ff75d..53f74c7 100644
--- a/clippy_lints/src/infinite_iter.rs
+++ b/clippy_lints/src/infinite_iter.rs
@@ -148,7 +148,7 @@
                 }
             }
             if method.name == "flat_map" && args.len() == 2 {
-                if let ExprClosure(_, _, body_id, _) = args[1].node {
+                if let ExprClosure(_, _, body_id, _, _) = args[1].node {
                     let body = cx.tcx.hir.body(body_id);
                     return is_infinite(cx, &body.value);
                 }
diff --git a/clippy_lints/src/map_clone.rs b/clippy_lints/src/map_clone.rs
index fcb84e9..f0e19a3 100644
--- a/clippy_lints/src/map_clone.rs
+++ b/clippy_lints/src/map_clone.rs
@@ -31,7 +31,7 @@
         if let ExprMethodCall(ref method, _, ref args) = expr.node {
             if method.name == "map" && args.len() == 2 {
                 match args[1].node {
-                    ExprClosure(_, ref decl, closure_eid, _) => {
+                    ExprClosure(_, ref decl, closure_eid, _, _) => {
                         let body = cx.tcx.hir.body(closure_eid);
                         let closure_expr = remove_blocks(&body.value);
                         let ty = cx.tables.pat_ty(&body.arguments[0].pat);
diff --git a/clippy_lints/src/no_effect.rs b/clippy_lints/src/no_effect.rs
index 782b403..971309a 100644
--- a/clippy_lints/src/no_effect.rs
+++ b/clippy_lints/src/no_effect.rs
@@ -46,7 +46,7 @@
     }
     match expr.node {
         Expr_::ExprLit(..) |
-        Expr_::ExprClosure(..) |
+        Expr_::ExprClosure(.., _) |
         Expr_::ExprPath(..) => true,
         Expr_::ExprIndex(ref a, ref b) |
         Expr_::ExprBinary(_, ref a, ref b) => has_no_effect(cx, a) && has_no_effect(cx, b),
diff --git a/clippy_lints/src/utils/author.rs b/clippy_lints/src/utils/author.rs
index ba8f002..dfac736 100644
--- a/clippy_lints/src/utils/author.rs
+++ b/clippy_lints/src/utils/author.rs
@@ -296,10 +296,16 @@
                 println!("Match(ref expr, ref arms, ref desugaring) = {},", current);
                 println!("    // unimplemented: `ExprMatch` is not further destructured at the moment");
             },
-            Expr_::ExprClosure(ref _capture_clause, ref _func, _, _) => {
-                println!("Closure(ref capture_clause, ref func, _, _) = {},", current);
+            Expr_::ExprClosure(ref _capture_clause, ref _func, _, _, _) => {
+                println!("Closure(ref capture_clause, ref func, _, _, _) = {},", current);
                 println!("    // unimplemented: `ExprClosure` is not further destructured at the moment");
             },
+            Expr_::ExprYield(ref sub) => {
+                let sub_pat = self.next("sub");
+                println!("Yield(ref sub) = {},", current);
+                self.current = sub_pat;
+                self.visit_expr(sub);
+            },
             Expr_::ExprBlock(ref block) => {
                 let block_pat = self.next("block");
                 println!("Block(ref {}) = {},", block_pat, current);
diff --git a/clippy_lints/src/utils/hir_utils.rs b/clippy_lints/src/utils/hir_utils.rs
index 4890bb8..2a4439c 100644
--- a/clippy_lints/src/utils/hir_utils.rs
+++ b/clippy_lints/src/utils/hir_utils.rs
@@ -321,6 +321,11 @@
                     self.hash_name(&i.node.name);
                 }
             },
+            ExprYield(ref e) => {
+                let c: fn(_) -> _ = ExprYield;
+                c.hash(&mut self.s);
+                self.hash_expr(e);
+            },
             ExprAssign(ref l, ref r) => {
                 let c: fn(_, _) -> _ = ExprAssign;
                 c.hash(&mut self.s);
@@ -373,8 +378,8 @@
                 self.hash_expr(e);
                 // TODO: _ty
             },
-            ExprClosure(cap, _, eid, _) => {
-                let c: fn(_, _, _, _) -> _ = ExprClosure;
+            ExprClosure(cap, _, eid, _, _) => {
+                let c: fn(_, _, _, _, _) -> _ = ExprClosure;
                 c.hash(&mut self.s);
                 cap.hash(&mut self.s);
                 self.hash_expr(&self.cx.tcx.hir.body(eid).value);
diff --git a/clippy_lints/src/utils/inspector.rs b/clippy_lints/src/utils/inspector.rs
index 7b06190..081b7ac 100644
--- a/clippy_lints/src/utils/inspector.rs
+++ b/clippy_lints/src/utils/inspector.rs
@@ -245,10 +245,14 @@
             print_expr(cx, cond, indent + 1);
             println!("{}source: {:?}", ind, source);
         },
-        hir::ExprClosure(ref clause, _, _, _) => {
+        hir::ExprClosure(ref clause, _, _, _, _) => {
             println!("{}Closure", ind);
             println!("{}clause: {:?}", ind, clause);
         },
+        hir::ExprYield(ref sub) => {
+            println!("{}Yield", ind);
+            print_expr(cx, sub, indent + 1);
+        }
         hir::ExprBlock(_) => {
             println!("{}Block", ind);
         },
diff --git a/clippy_lints/src/utils/mod.rs b/clippy_lints/src/utils/mod.rs
index c08f7d4..9b14dd1 100644
--- a/clippy_lints/src/utils/mod.rs
+++ b/clippy_lints/src/utils/mod.rs
@@ -104,6 +104,7 @@
 pub fn in_constant(cx: &LateContext, id: NodeId) -> bool {
     let parent_id = cx.tcx.hir.get_parent(id);
     match MirSource::from_node(cx.tcx, parent_id) {
+        MirSource::GeneratorDrop(_) |
         MirSource::Fn(_) => false,
         MirSource::Const(_) |
         MirSource::Static(..) |
diff --git a/clippy_lints/src/utils/sugg.rs b/clippy_lints/src/utils/sugg.rs
index 6cfbe8c..1c2e079 100644
--- a/clippy_lints/src/utils/sugg.rs
+++ b/clippy_lints/src/utils/sugg.rs
@@ -49,11 +49,12 @@
             match expr.node {
                 hir::ExprAddrOf(..) |
                 hir::ExprBox(..) |
-                hir::ExprClosure(..) |
+                hir::ExprClosure(.., _) |
                 hir::ExprIf(..) |
                 hir::ExprUnary(..) |
                 hir::ExprMatch(..) => Sugg::MaybeParen(snippet),
                 hir::ExprAgain(..) |
+                hir::ExprYield(..) |
                 hir::ExprArray(..) |
                 hir::ExprBlock(..) |
                 hir::ExprBreak(..) |
@@ -106,6 +107,7 @@
             ast::ExprKind::Call(..) |
             ast::ExprKind::Catch(..) |
             ast::ExprKind::Continue(..) |
+            ast::ExprKind::Yield(..) |
             ast::ExprKind::Field(..) |
             ast::ExprKind::ForLoop(..) |
             ast::ExprKind::Index(..) |