shadow_unrelated does not register a variable being shadowed #7620
Labels
C-bug
Category: Clippy is not doing the correct thing
I-false-negative
Issue: The lint should have been triggered on code, but wasn't
I accidentally shadowed a variable without knowing and the linter did not warn me about that. Not a huge deal but just wanted to report the issue.
Lint name:
shadow_unrelated
I tried this code:
I expected to see this happen: Warning shown about variables
s
andx
being shadowed when runningcargo clippy -- -W clippy::shadow_reuse -W clippy::shadow_same -W clippy::shadow_unrelated
.Instead, this happened: No warning for variable
s
was shown.Meta
Rust version (
rustc -Vv
):The text was updated successfully, but these errors were encountered: