mirror of
https://github.com/rust-lang/rust-clippy
synced 2025-02-16 22:18:40 +00:00
Rustup to rustc 1.10.0-nightly (645dd013a 2016-04-24); release 0.0.64
This commit is contained in:
parent
c66e90303f
commit
08818de9b7
6 changed files with 8 additions and 8 deletions
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "clippy"
|
||||
version = "0.0.63"
|
||||
version = "0.0.64"
|
||||
authors = [
|
||||
"Manish Goregaokar <manishsmail@gmail.com>",
|
||||
"Andre Bogus <bogusandre@gmail.com>",
|
||||
|
|
|
@ -43,7 +43,7 @@ struct ExVisitor<'v> {
|
|||
|
||||
impl<'v> Visitor<'v> for ExVisitor<'v> {
|
||||
fn visit_expr(&mut self, expr: &'v Expr) {
|
||||
if let ExprClosure(_, _, ref block) = expr.node {
|
||||
if let ExprClosure(_, _, ref block, _) = expr.node {
|
||||
let complex = {
|
||||
if block.stmts.is_empty() {
|
||||
if let Some(ref ex) = block.expr {
|
||||
|
|
|
@ -40,7 +40,7 @@ impl LateLintPass for EtaPass {
|
|||
}
|
||||
|
||||
fn check_closure(cx: &LateContext, expr: &Expr) {
|
||||
if let ExprClosure(_, ref decl, ref blk) = expr.node {
|
||||
if let ExprClosure(_, ref decl, ref blk, _) = expr.node {
|
||||
if !blk.stmts.is_empty() {
|
||||
// || {foo(); bar()}; can't be reduced here
|
||||
return;
|
||||
|
|
|
@ -25,7 +25,7 @@ impl LateLintPass for MapClonePass {
|
|||
if let ExprMethodCall(name, _, ref args) = expr.node {
|
||||
if name.node.as_str() == "map" && args.len() == 2 {
|
||||
match args[1].node {
|
||||
ExprClosure(_, ref decl, ref blk) => {
|
||||
ExprClosure(_, ref decl, ref blk, _) => {
|
||||
if_let_chain! {
|
||||
[
|
||||
// just one expression in the closure
|
||||
|
|
|
@ -128,7 +128,7 @@ impl EarlyLintPass for MiscEarly {
|
|||
fn check_expr(&mut self, cx: &EarlyContext, expr: &Expr) {
|
||||
if let ExprKind::Call(ref paren, _) = expr.node {
|
||||
if let ExprKind::Paren(ref closure) = paren.node {
|
||||
if let ExprKind::Closure(_, ref decl, ref block) = closure.node {
|
||||
if let ExprKind::Closure(_, ref decl, ref block, _) = closure.node {
|
||||
span_lint_and_then(cx,
|
||||
REDUNDANT_CLOSURE_CALL,
|
||||
expr.span,
|
||||
|
@ -150,7 +150,7 @@ impl EarlyLintPass for MiscEarly {
|
|||
let StmtKind::Decl(ref first, _) = w[0].node,
|
||||
let DeclKind::Local(ref local) = first.node,
|
||||
let Option::Some(ref t) = local.init,
|
||||
let ExprKind::Closure(_,_,_) = t.node,
|
||||
let ExprKind::Closure(_,_,_,_) = t.node,
|
||||
let PatKind::Ident(_,sp_ident,_) = local.pat.node,
|
||||
let StmtKind::Semi(ref second,_) = w[1].node,
|
||||
let ExprKind::Assign(_,ref call) = second.node,
|
||||
|
|
|
@ -333,8 +333,8 @@ impl<'a, 'tcx: 'a> SpanlessHash<'a, 'tcx> {
|
|||
self.hash_expr(e);
|
||||
// TODO: _ty
|
||||
}
|
||||
ExprClosure(cap, _, ref b) => {
|
||||
let c: fn(_, _, _) -> _ = ExprClosure;
|
||||
ExprClosure(cap, _, ref b, _) => {
|
||||
let c: fn(_, _, _, _) -> _ = ExprClosure;
|
||||
c.hash(&mut self.s);
|
||||
cap.hash(&mut self.s);
|
||||
self.hash_block(b);
|
||||
|
|
Loading…
Add table
Reference in a new issue