Skip to content

fix: map_entry suggest wrongly when key is not Copy #14314

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 2, 2025

Conversation

profetia
Copy link
Contributor

Closes #13306
Closes #9925
Closes #9470
Closes #9305

Clippy gives wrong suggestions when the key is not Copy. As suggested in #9925, in such cases Clippy will simply warn but no fix.

changelog: [map_entry]: fix wrong suggestions when key is not Copy

@rustbot
Copy link
Collaborator

rustbot commented Feb 27, 2025

r? @blyxyas

rustbot has assigned @blyxyas.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Feb 27, 2025
Copy link
Member

@blyxyas blyxyas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really good first patch! Just a single nit 🐱

Copy link
Member

@blyxyas blyxyas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks! ❤️

@blyxyas blyxyas added this pull request to the merge queue Mar 2, 2025
Merged via the queue into rust-lang:master with commit aa2180f Mar 2, 2025
11 checks passed
meithecatte added a commit to meithecatte/rust-clippy that referenced this pull request Apr 9, 2025
github-merge-queue bot pushed a commit that referenced this pull request Apr 9, 2025
…4568)

Fixes #14449, introduced in #14314

changelog: [`map_entry`]: fix a false positive where the lint would
trigger without any insert calls present
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties
Projects
None yet
3 participants