Add ifs_as_logical_ops lint#17449
Conversation
Co-authored-by: Ada Alakbarova <ada.alakbarova@proton.me>
|
Thanks for the pull request. A reviewer will take a look after it receives 2 community reviews. In the meantime, we would highly appreciate if you could try to review any of PRs waiting on community reviews. 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 (
|
Co-authored-by: Ada Alakbarova <ada.alakbarova@proton.me>
ea08daf to
5ee07f1
Compare
|
The original PR was reviewed to bits already, so going through community review yet again might be superfluous. Let me assign a reviewer, and see what they think. r? clippy |
|
Lintcheck changes for 5ee07f1
This comment will be updated if you push new changes |
This PR supersedes #14904. All the content is kept the same, apart from some small changes:
.DS_Storedirectory (Add ifs_as_logical_ops lint #14904 (review))is_from_proc_macrocheck (Add ifs_as_logical_ops lint #14904 (comment))hir_utils.rsaccidentally removed in the dogfooding commitThe original description follows:
Fixes #14865 by adding the ifs_as_logical_ops lint.
Only adds the conjunctive version (transform if x else y => x && y) for now.
changelog: [
ifs_as_logical_ops] : "Warn about cases wherex && ycould be used in place of if conditions"