mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-23 21:23:56 +00:00
7217c0f3ac
Improve `redundant_locals` help message Fixes #11625 AFAIK, `span_lint_and_help` points the beginning of spans when we pass multiple spans to the second argument, so This PR I also modified its help span and its message. lint result of the given example in the issue will be: ```console error: redundant redefinition of a binding `apple` --> src/main.rs:5:5 | 5 | let apple = apple; | ^^^^^^^^^^^^^^^^^^ | help: `apple` is initially defined here --> src/main.rs:4:9 | 4 | let apple = 42; | ^^^^^ = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_locals ``` I hope that this change might help reduce user confusion, but I'd appreciate alternative suggestions:) changelog: [`redundant_locals`]: Now points at the rebinding of the variable |
||
---|---|---|
.. | ||
src | ||
Cargo.toml | ||
README.md |