Skip to content

[WIP] New lint: matches_instead_of_eq #14820

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

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ARandomDev99
Copy link
Contributor

@ARandomDev99 ARandomDev99 commented May 16, 2025

Fixes #14688

If you added a new lint, here's a checklist for things that will be
checked during review or continuous integration.

  • Followed lint naming conventions
  • Added passing UI tests (including committed .stderr file)
  • cargo test passes locally
  • Executed cargo dev update_lints
  • Added lint documentation
  • Run cargo dev fmt
changelog: New lint: [`matches_instead_of_eq`]

TO DO: Modify code that causes the dogfood test to fail.

@ARandomDev99 ARandomDev99 changed the title New lint: matches_instead_of_eq [WIP] New lint: matches_instead_of_eq May 16, 2025
@ARandomDev99
Copy link
Contributor Author

r? rust-lang/clippy

@ARandomDev99
Copy link
Contributor Author

I'll hold off making the dogfood test pass until there's some comment from the maintainers about whether the current UI test is sufficient and covers all cases.

@Jarcho
Copy link
Contributor

Jarcho commented May 21, 2025

This is essentially the same as equatable_if_let, but on matches!. It would be good to share most of the implementation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Suggest using == instead of matches!
2 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy