False positive for unnecessary_filter_map #6804
Labels
C-bug
Category: Clippy is not doing the correct thing
E-medium
Call for participation: Medium difficulty level problem and requires some initial experience.
I-false-positive
Issue: The lint was triggered on code it shouldn't have
Lint name:
unnecessary_filter_map
I tried this code:
I expected to see this happen:
The filter map is required because the
Item
is being changed from()
tou64
, so I expected this to not be linted.Instead, this happened:
The code is linted as failing
unnecessary_filter_map
, despite the use offilter_map
being required:But
filter
does not compile because that does not do the necessary type conversion forItem
:Meta
cargo clippy -V
:clippy 0.0.212 (cb75ad5 2021-02-10)
rustc -Vv
:The text was updated successfully, but these errors were encountered: