Skip to content

Issue4983 bool updates #5365

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 4 commits into from
Mar 30, 2020
Merged

Issue4983 bool updates #5365

merged 4 commits into from
Mar 30, 2020

Conversation

mgr-inz-rafal
Copy link
Contributor

changelog: Check for bool inequality comparison that might be written more concisely

Fixes #4983

@flip1995 flip1995 added the S-waiting-on-author Status: This is awaiting some action from the author. (Use `@rustbot ready` to update this status) label Mar 23, 2020
@mgr-inz-rafal
Copy link
Contributor Author

I think it's almost ready. One outstanding issue is that I should consider suggesting a != b and - for teaching purposes - also a ^ b.

I wonder if it is possible to add a second, optional suggestion to span_lint_and_sugg so that it is not used as an automatic fix. However, If this is going to complicate the code too much, I'd rather bail out of providing additional suggestion.

@mgr-inz-rafal
Copy link
Contributor Author

OK, I'm submitting it for review as is. Any comments appreciated.

@mgr-inz-rafal mgr-inz-rafal marked this pull request as ready for review March 24, 2020 18:00
@flip1995 flip1995 added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties and removed S-waiting-on-author Status: This is awaiting some action from the author. (Use `@rustbot ready` to update this status) labels Mar 30, 2020
@flip1995 flip1995 requested a review from yaahc March 30, 2020 17:47
Copy link
Member

@yaahc yaahc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good minus the one nit

@yaahc yaahc requested a review from Manishearth March 30, 2020 19:05
@yaahc
Copy link
Member

yaahc commented Mar 30, 2020

@bors r+

@bors
Copy link
Contributor

bors commented Mar 30, 2020

📌 Commit c8f3241 has been approved by yaahc

@bors
Copy link
Contributor

bors commented Mar 30, 2020

⌛ Testing commit c8f3241 with merge 42c36dc...

@bors
Copy link
Contributor

bors commented Mar 30, 2020

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: yaahc
Pushing 42c36dc to master...

@bors bors merged commit 42c36dc into rust-lang:master Mar 30, 2020
@mgr-inz-rafal mgr-inz-rafal deleted the issue4983_bool_updates branch March 31, 2020 06:51
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties
Projects
None yet
Development

Successfully merging this pull request may close these issues.

New lint idea: suggest ^ when comparing bools
4 participants