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