Skip to content

correct single_match lint suggestion #13824

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
Dec 13, 2024

Conversation

lapla-cogito
Copy link
Contributor

@lapla-cogito lapla-cogito commented Dec 13, 2024

fix #12758

The single_match lint makes incorrect suggestions when comparing with byte string literals. There seems to be an issue with the logic that calculates the number of refs when creating suggestions.

changelog: [single_match]: No longer make incorrect suggestions when comparing with byte string literals.

@rustbot
Copy link
Collaborator

rustbot commented Dec 13, 2024

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 Dec 13, 2024
@lapla-cogito lapla-cogito changed the title single_match lint that not make incorrect suggestions when comparing with byte string literals. single_match lint that not make incorrect suggestions when comparing with byte string literals Dec 13, 2024
@lapla-cogito lapla-cogito changed the title single_match lint that not make incorrect suggestions when comparing with byte string literals correct single_match lint suggestion Dec 13, 2024
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 Dec 13, 2024
@blyxyas blyxyas removed this pull request from the merge queue due to a manual request Dec 13, 2024
@blyxyas
Copy link
Member

blyxyas commented Dec 13, 2024

@lapla-cogito, It seems that there's a merge conflict 🌵 Could you fix that? (After fixing it, squash the commits so that we're still merging only one commit)

@lapla-cogito
Copy link
Contributor Author

@blyxyas
Seems to be resolved now.

@blyxyas blyxyas added this pull request to the merge queue Dec 13, 2024
Merged via the queue into rust-lang:master with commit 13463cb Dec 13, 2024
9 checks passed
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
Development

Successfully merging this pull request may close these issues.

single_match: type are incompatible
4 participants