mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-23 21:23:56 +00:00
FIx dogfood
This commit is contained in:
parent
b36bb0a68d
commit
696dc369df
1 changed files with 2 additions and 4 deletions
|
@ -70,10 +70,8 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Pass {
|
|||
},
|
||||
hir::PatKind::Binding(hir::BindingAnnotation::Unannotated, _, name, None) => match closure_expr.node {
|
||||
hir::ExprKind::Unary(hir::UnOp::UnDeref, ref inner) => lint(cx, e.span, args[0].span, name, inner),
|
||||
hir::ExprKind::MethodCall(ref method, _, ref obj) => if method.ident.as_str() == "clone" {
|
||||
if match_trait_method(cx, closure_expr, &paths::CLONE_TRAIT) {
|
||||
lint(cx, e.span, args[0].span, name, &obj[0]);
|
||||
}
|
||||
hir::ExprKind::MethodCall(ref method, _, ref obj) => if method.ident.as_str() == "clone" && match_trait_method(cx, closure_expr, &paths::CLONE_TRAIT) {
|
||||
lint(cx, e.span, args[0].span, name, &obj[0]);
|
||||
}
|
||||
_ => {},
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue