This commit is contained in:
csmoe 2018-07-12 16:53:53 +08:00 committed by Oliver Schneider
parent 12ded030b6
commit 8cf463fe93
23 changed files with 66 additions and 66 deletions

View file

@ -1139,7 +1139,7 @@ fn lint_clone_on_copy(cx: &LateContext, expr: &hir::Expr, arg: &hir::Expr, arg_t
_ => {},
}
hir::map::NodeStmt(stmt) => {
if let hir::StmtDecl(ref decl, _) = stmt.node {
if let hir::StmtKind::Decl(ref decl, _) = stmt.node {
if let hir::DeclLocal(ref loc) = decl.node {
if let hir::PatKind::Ref(..) = loc.pat.node {
// let ref y = *x borrows x, let ref y = x.clone() does not