map_entry is incorrectly suggested when map is used between contains_key and insert #6196
Labels
C-bug
Category: Clippy is not doing the correct thing
I-suggestion-causes-error
Issue: The suggestions provided by this Lint cause an ICE/error when applied
Related issue: #5696
Reproducing code:
produces
However, the commented-out code (which is what I believe clippy is suggesting) fails to compile with
I believe the correct behavior here is to not emit a suggestion at all.
Meta
cargo clippy -V
: clippy 0.0.212 (18bf6b4 2020-10-07)rustc -Vv
:The text was updated successfully, but these errors were encountered: