mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-23 13:13:34 +00:00
Remove initialization note from shadow lint
This commit is contained in:
parent
89f77f3512
commit
99861c0e88
2 changed files with 0 additions and 27 deletions
|
@ -298,7 +298,6 @@ fn lint_shadow<'tcx>(
|
|||
snippet(cx, expr.span, "..")
|
||||
),
|
||||
|diag| {
|
||||
diag.span_note(expr.span, "initialization happens here");
|
||||
diag.span_note(prev_span, "previous binding is here");
|
||||
},
|
||||
);
|
||||
|
@ -309,7 +308,6 @@ fn lint_shadow<'tcx>(
|
|||
pattern_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");
|
||||
},
|
||||
);
|
||||
|
|
|
@ -42,11 +42,6 @@ LL | let x = { *x + 1 };
|
|||
| ^
|
||||
|
|
||||
= 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
|
||||
--> $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);
|
||||
| ^
|
||||
|
|
||||
note: initialization happens here
|
||||
--> $DIR/shadow.rs:31:13
|
||||
|
|
||||
LL | let x = id(x);
|
||||
| ^^^^^
|
||||
note: previous binding is here
|
||||
--> $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);
|
||||
| ^
|
||||
|
|
||||
note: initialization happens here
|
||||
--> $DIR/shadow.rs:32:13
|
||||
|
|
||||
LL | let x = (1, x);
|
||||
| ^^^^^^
|
||||
note: previous binding is here
|
||||
--> $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);
|
||||
| ^
|
||||
|
|
||||
note: initialization happens here
|
||||
--> $DIR/shadow.rs:33:13
|
||||
|
|
||||
LL | let x = first(x);
|
||||
| ^^^^^^^^
|
||||
note: previous binding is here
|
||||
--> $DIR/shadow.rs:32:9
|
||||
|
|
||||
|
@ -111,11 +91,6 @@ LL | let x = y;
|
|||
| ^
|
||||
|
|
||||
= 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
|
||||
--> $DIR/shadow.rs:33:9
|
||||
|
|
||||
|
|
Loading…
Reference in a new issue