Compile error after applying clippy::map_entry
#13934
Labels
C-bug
Category: Clippy is not doing the correct thing
I-false-positive
Issue: The lint was triggered on code it shouldn't have
Summary
After applying a
clippy::map_entry
suggested fix, the generated code fails to compile. Clippy appears unable to see uses of the given map from within method calls on the same struct.Lint Name
clippy::map_entry
Reproducer
I tried this code:
I saw this happen:
When applied to the original code, this suggestion fails to compile with this error:
I expected to see this happen:
I expect clippy to not make this suggestion at all.
Version
Additional Labels
@rustbot label +l-suggestion-causes-error
The text was updated successfully, but these errors were encountered: