diff options
| author | Leo Meira Vital <leo.vital@nubank.com.br> | 2020-07-13 01:57:19 -0300 |
|---|---|---|
| committer | Leo Meira Vital <leo.vital@nubank.com.br> | 2020-07-15 11:12:38 -0300 |
| commit | a0640457a912720a5473d7feff40576a2f97df1e (patch) | |
| tree | c214b631d8a9fad957614ab76142b20e3f4913e9 | |
| parent | 84cdce01cbd40bb41b8bcc7eb1cc0778acef6dce (diff) | |
| download | rust-a0640457a912720a5473d7feff40576a2f97df1e.tar.gz rust-a0640457a912720a5473d7feff40576a2f97df1e.zip | |
Removing snippet from SHADOW_UNRELATED message.
| -rw-r--r-- | clippy_lints/src/shadow.rs | 6 | ||||
| -rw-r--r-- | tests/ui/shadow.stderr | 2 |
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; |
