Merge remote-tracking branch 'upstream/master' into rustup

This commit is contained in:
flip1995 2020-07-03 12:50:41 +02:00
commit a7c58e66d4
No known key found for this signature in database
GPG key ID: 2CEFCDB27ED0BE79
41 changed files with 951 additions and 246 deletions

View file

@ -2044,7 +2044,7 @@ fn lint_clone_on_copy(cx: &LateContext<'_>, expr: &hir::Expr<'_>, arg: &hir::Exp
}
span_lint_and_then(cx, CLONE_ON_COPY, expr.span, "using `clone` on a `Copy` type", |diag| {
if let Some((text, snip)) = snip {
diag.span_suggestion(expr.span, text, snip, Applicability::Unspecified);
diag.span_suggestion(expr.span, text, snip, Applicability::MachineApplicable);
}
});
}