-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Add new lint stacked_if_match
#13304
base: master
Are you sure you want to change the base?
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @Alexendoo (or someone else) some time within the next two weeks. Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (
|
☔ The latest upstream changes (presumably #11476) made this pull request unmergeable. Please resolve the merge conflicts. |
In theory cases with |
Hi @alex-semenyuk, thank you for the comment. To prevent overlinting, Note: this is my first contribution to Clippy, so if there's a faster/cleaner way to implement this, please let me know! |
☔ The latest upstream changes (presumably #13247) made this pull request unmergeable. Please resolve the merge conflicts. |
☔ The latest upstream changes (presumably #13322) made this pull request unmergeable. Please resolve the merge conflicts. |
A few times I've looked at this again trying to figure out what the rustfmt rules are but they seem difficult to predict, e.g. here's an if 1 == if xxxxxxxxxxxxxxxxxx {
111111111111
} else {
222222222222222
} && x == y
{
3
} else {
4
}; Maybe instead of trying to recreate the behaviour we should check the actual format directly, something like calling |
fixes #12483
changelog: new [
stacked_if_match
] lint againstif if
andmatch match