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 |
||
---|---|---|
.. | ||
test_utils | ||
ui | ||
ui-cargo | ||
ui-internal | ||
ui-toml | ||
workspace_test | ||
check-fmt.rs | ||
clippy.toml | ||
compile-test.rs | ||
dogfood.rs | ||
headers.rs | ||
integration.rs | ||
lint_message_convention.rs | ||
missing-test-files.rs | ||
versioncheck.rs | ||
workspace.rs |