-
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
Replace if_chain with let chains #11750
Conversation
9e0f89e
to
5445362
Compare
☔ The latest upstream changes (presumably #11780) made this pull request unmergeable. Please resolve the merge conflicts. |
I will review this today. No need to rebase before that. Once I'm done reviewing, you can rebase and directly merge |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM overall. rg if_chain
in the repo still shows a few if_chain
usages. But those are in tests and necessary. However, I think once let-chains are stabilized, we can also remove this one special check for if_chain
in the index_refutable_slice
lint implementation.
The needless_borrow_pat
test implements its own if_chain
macro for testing. Maybe we can reuse that in index_refutable_slice
for now and with that get rid of the if_chain
dep in the top level Cargo.toml
.
All of this is non-blocking for this PR. Feel free to address it here or we can deal with it in a follow-up PR. r=me after rebase
5445362
to
13b4bb1
Compare
@bors r=flip1995 The |
☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test |
Closes #9353
Let chains are now supported by rustfmt 🎉
The PR is split into two commits
if-to-let-chain clippy*/**/*.rs
r? @flip1995
changelog: none