Skip to content

Commit 301f2c4

Browse files
committed
Auto merge of rust-lang#13299 - alex-semenyuk:unwrap_or_else_suggestion, r=Alexendoo
Fix suggestion unnecessary_lazy_eval As mentioned at rust-lang#13293 improve suggestion via span_suggestion_verbose changelog: none
2 parents ecfc7d9 + f4fc385 commit 301f2c4

File tree

3 files changed

+402
-203
lines changed

3 files changed

+402
-203
lines changed

clippy_lints/src/methods/unnecessary_lazy_eval.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,9 @@ pub(super) fn check<'tcx>(
6464
// but prefer to avoid changing the signature of the function itself.
6565
if let hir::ExprKind::MethodCall(.., span) = expr.kind {
6666
span_lint_and_then(cx, UNNECESSARY_LAZY_EVALUATIONS, expr.span, msg, |diag| {
67-
diag.span_suggestion(
67+
diag.span_suggestion_verbose(
6868
span,
69-
format!("use `{simplify_using}(..)` instead"),
69+
format!("use `{simplify_using}` instead"),
7070
format!("{simplify_using}({})", snippet(cx, body_expr.span, "..")),
7171
applicability,
7272
);

0 commit comments

Comments
 (0)