Imporve redundant_slicing lint by taking the expected type into account #7257
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
Lint name:
redundant_slicing
I tried this code:
I expected to see a warning for each call, but instead only 9th is reported since types before and after indexing are same. It would be much better if clippy is able to see what type is expected by a higher expression/parameter.
If it's possible, I would like to do it myself.
Meta
cargo clippy -V
: clippy 0.1.53 (bacf770 2021-05-05)rustc -Vv
:The text was updated successfully, but these errors were encountered: