about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--clippy_lints/src/shadow.rs6
-rw-r--r--tests/ui/shadow.stderr2
2 files changed, 2 insertions, 6 deletions
diff --git a/clippy_lints/src/shadow.rs b/clippy_lints/src/shadow.rs
index 194786c5c41..fab13c8c124 100644
--- a/clippy_lints/src/shadow.rs
+++ b/clippy_lints/src/shadow.rs
@@ -295,11 +295,7 @@ fn lint_shadow<'tcx>(
                 cx,
                 SHADOW_UNRELATED,
                 pattern_span,
-                &format!(
-                    "`{}` is shadowed by `{}`",
-                    snippet(cx, pattern_span, "_"),
-                    snippet(cx, expr.span, "..")
-                ),
+                &format!("`{}` is being shadowed", snippet(cx, pattern_span, "_")),
                 |diag| {
                     diag.span_note(expr.span, "initialization happens here");
                     diag.span_note(prev_span, "previous binding is here");
diff --git a/tests/ui/shadow.stderr b/tests/ui/shadow.stderr
index 7fa58cf7649..8a831375b41 100644
--- a/tests/ui/shadow.stderr
+++ b/tests/ui/shadow.stderr
@@ -104,7 +104,7 @@ note: previous binding is here
 LL |     let x = (1, x);
    |         ^
 
-error: `x` is shadowed by `y`
+error: `x` is being shadowed
   --> $DIR/shadow.rs:34:9
    |
 LL |     let x = y;