mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-11 08:05:12 +00:00
Removing snippet from SHADOW_UNRELATED message.
This commit is contained in:
parent
84cdce01cb
commit
a0640457a9
@ -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");
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user