-
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
FP in collapsible_match
on futures select!
macro
#7591
Comments
Thank you for the report. At a first glance, it looks like the lint doesn't check if the code is inside a macro (I haven't looked at the linting code, though). 🙃 @rustbot label +I-false-positive |
#7565 looks potentially suspicious as it contains an August 16th change to the collapsible_match lint The timing lines up. |
There have also been some changes in the Rust repo on this specific lint. I wouldn't think that it originated from #7565 as your Clippy version stated a date before that PR was merged. 🙃 |
Yep - confirmed @xFrednet's hypothesis - by running |
Thank you, @nipunn1313, for the test 🙃. cc. @camsteffen in case you want to work on another regression issue 😉 |
Fix clippy::collapsible_match with let expressions This fixes rust-lang#7575 which is a regression from #80357. I am fixing the bug here instead of in the clippy repo (if that's okay) because a) the regression has not been synced yet and b) I would like to land the fix on nightly asap. The fix is basically to re-generalize `match` and `if let` for the lint implementation (they were split because `if let` no longer desugars to `match` in the HIR). Also fixes rust-lang#7586 and fixes rust-lang#7591 cc `@rust-lang/clippy` `@xFrednet` do you want to review this?
I tried this code:
I expected to see no clippy error
Instead, this happened:
clippy seems to want a different code which is not valid:
leading to
Meta
It's a recent regression
Notably, I found that with
things work fine
came up in the testsuite of rust-lang/futures-rs#2479
The text was updated successfully, but these errors were encountered: