mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-12-22 02:53:20 +00:00
008ba2b8bb
fix dogfood lints in `redundant_local` keep `redundant_local` from running in proc macros rewrite `redundant_local` as late pass make redundant_local's `find_binding` more readable pluralize `redundant_locals` name add test for `redundant_locals` in macros test `redundant_locals` in proc macros use more destructuring in `redundant_locals` fix: format redundant_locals.rs ignore needless_pass_by_mut_ref in redundant_locals test
136 lines
2.9 KiB
Text
136 lines
2.9 KiB
Text
error: redundant redefinition of a binding
|
|
--> $DIR/redundant_locals.rs:11:9
|
|
|
|
|
LL | let x = 1;
|
|
| ^
|
|
LL | let x = x;
|
|
| ^^^^^^^^^^
|
|
|
|
|
= help: remove the redefinition of `x`
|
|
= note: `-D clippy::redundant-locals` implied by `-D warnings`
|
|
|
|
error: redundant redefinition of a binding
|
|
--> $DIR/redundant_locals.rs:16:9
|
|
|
|
|
LL | let mut x = 1;
|
|
| ^^^^^
|
|
LL | let mut x = x;
|
|
| ^^^^^^^^^^^^^^
|
|
|
|
|
= help: remove the redefinition of `x`
|
|
|
|
error: redundant redefinition of a binding
|
|
--> $DIR/redundant_locals.rs:37:14
|
|
|
|
|
LL | fn parameter(x: i32) {
|
|
| ^
|
|
LL | let x = x;
|
|
| ^^^^^^^^^^
|
|
|
|
|
= help: remove the redefinition of `x`
|
|
|
|
error: redundant redefinition of a binding
|
|
--> $DIR/redundant_locals.rs:42:9
|
|
|
|
|
LL | let x = 1;
|
|
| ^
|
|
LL | let x = x;
|
|
| ^^^^^^^^^^
|
|
|
|
|
= help: remove the redefinition of `x`
|
|
|
|
error: redundant redefinition of a binding
|
|
--> $DIR/redundant_locals.rs:43:9
|
|
|
|
|
LL | let x = x;
|
|
| ^
|
|
LL | let x = x;
|
|
| ^^^^^^^^^^
|
|
|
|
|
= help: remove the redefinition of `x`
|
|
|
|
error: redundant redefinition of a binding
|
|
--> $DIR/redundant_locals.rs:44:9
|
|
|
|
|
LL | let x = x;
|
|
| ^
|
|
LL | let x = x;
|
|
| ^^^^^^^^^^
|
|
|
|
|
= help: remove the redefinition of `x`
|
|
|
|
error: redundant redefinition of a binding
|
|
--> $DIR/redundant_locals.rs:45:9
|
|
|
|
|
LL | let x = x;
|
|
| ^
|
|
LL | let x = x;
|
|
| ^^^^^^^^^^
|
|
|
|
|
= help: remove the redefinition of `x`
|
|
|
|
error: redundant redefinition of a binding
|
|
--> $DIR/redundant_locals.rs:50:9
|
|
|
|
|
LL | let a = 1;
|
|
| ^
|
|
LL | let b = 2;
|
|
LL | let a = a;
|
|
| ^^^^^^^^^^
|
|
|
|
|
= help: remove the redefinition of `a`
|
|
|
|
error: redundant redefinition of a binding
|
|
--> $DIR/redundant_locals.rs:51:9
|
|
|
|
|
LL | let b = 2;
|
|
| ^
|
|
LL | let a = a;
|
|
LL | let b = b;
|
|
| ^^^^^^^^^^
|
|
|
|
|
= help: remove the redefinition of `b`
|
|
|
|
error: redundant redefinition of a binding
|
|
--> $DIR/redundant_locals.rs:58:13
|
|
|
|
|
LL | let x = 1;
|
|
| ^
|
|
LL | let x = x;
|
|
| ^^^^^^^^^^
|
|
|
|
|
= help: remove the redefinition of `x`
|
|
|
|
error: redundant redefinition of a binding
|
|
--> $DIR/redundant_locals.rs:65:13
|
|
|
|
|
LL | let x = 1;
|
|
| ^
|
|
LL | let x = x;
|
|
| ^^^^^^^^^^
|
|
|
|
|
= help: remove the redefinition of `x`
|
|
|
|
error: redundant redefinition of a binding
|
|
--> $DIR/redundant_locals.rs:68:6
|
|
|
|
|
LL | |x: i32| {
|
|
| ^
|
|
LL | let x = x;
|
|
| ^^^^^^^^^^
|
|
|
|
|
= help: remove the redefinition of `x`
|
|
|
|
error: redundant redefinition of a binding
|
|
--> $DIR/redundant_locals.rs:85:9
|
|
|
|
|
LL | let x = 1;
|
|
| ^
|
|
...
|
|
LL | let x = x;
|
|
| ^^^^^^^^^^
|
|
|
|
|
= help: remove the redefinition of `x`
|
|
|
|
error: aborting due to 13 previous errors
|
|
|