Remove initialization note from shadow lint

This commit is contained in:
Cameron Steffen 2021-01-11 09:10:24 -06:00
parent 89f77f3512
commit 99861c0e88
2 changed files with 0 additions and 27 deletions

View File

@ -298,7 +298,6 @@ fn lint_shadow<'tcx>(
snippet(cx, expr.span, "..") snippet(cx, expr.span, "..")
), ),
|diag| { |diag| {
diag.span_note(expr.span, "initialization happens here");
diag.span_note(prev_span, "previous binding is here"); diag.span_note(prev_span, "previous binding is here");
}, },
); );
@ -309,7 +308,6 @@ fn lint_shadow<'tcx>(
pattern_span, pattern_span,
&format!("`{}` is being shadowed", snippet(cx, pattern_span, "_")), &format!("`{}` is being shadowed", snippet(cx, pattern_span, "_")),
|diag| { |diag| {
diag.span_note(expr.span, "initialization happens here");
diag.span_note(prev_span, "previous binding is here"); diag.span_note(prev_span, "previous binding is here");
}, },
); );

View File

@ -42,11 +42,6 @@ LL | let x = { *x + 1 };
| ^ | ^
| |
= note: `-D clippy::shadow-reuse` implied by `-D warnings` = note: `-D clippy::shadow-reuse` implied by `-D warnings`
note: initialization happens here
--> $DIR/shadow.rs:30:13
|
LL | let x = { *x + 1 };
| ^^^^^^^^^^
note: previous binding is here note: previous binding is here
--> $DIR/shadow.rs:29:9 --> $DIR/shadow.rs:29:9
| |
@ -59,11 +54,6 @@ error: `x` is shadowed by `id(x)` which reuses the original value
LL | let x = id(x); LL | let x = id(x);
| ^ | ^
| |
note: initialization happens here
--> $DIR/shadow.rs:31:13
|
LL | let x = id(x);
| ^^^^^
note: previous binding is here note: previous binding is here
--> $DIR/shadow.rs:30:9 --> $DIR/shadow.rs:30:9
| |
@ -76,11 +66,6 @@ error: `x` is shadowed by `(1, x)` which reuses the original value
LL | let x = (1, x); LL | let x = (1, x);
| ^ | ^
| |
note: initialization happens here
--> $DIR/shadow.rs:32:13
|
LL | let x = (1, x);
| ^^^^^^
note: previous binding is here note: previous binding is here
--> $DIR/shadow.rs:31:9 --> $DIR/shadow.rs:31:9
| |
@ -93,11 +78,6 @@ error: `x` is shadowed by `first(x)` which reuses the original value
LL | let x = first(x); LL | let x = first(x);
| ^ | ^
| |
note: initialization happens here
--> $DIR/shadow.rs:33:13
|
LL | let x = first(x);
| ^^^^^^^^
note: previous binding is here note: previous binding is here
--> $DIR/shadow.rs:32:9 --> $DIR/shadow.rs:32:9
| |
@ -111,11 +91,6 @@ LL | let x = y;
| ^ | ^
| |
= note: `-D clippy::shadow-unrelated` implied by `-D warnings` = note: `-D clippy::shadow-unrelated` implied by `-D warnings`
note: initialization happens here
--> $DIR/shadow.rs:35:13
|
LL | let x = y;
| ^
note: previous binding is here note: previous binding is here
--> $DIR/shadow.rs:33:9 --> $DIR/shadow.rs:33:9
| |