Skip to content
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

update: Sugg::not() replacing the comparison operator. #7320 #8117

Merged
merged 6 commits into from
Dec 28, 2021

Conversation

hotate29
Copy link
Contributor

fixes #7320

changelog: needless_bool: Changed to make a smart suggestion.

@rust-highfive
Copy link

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @camsteffen (or someone else) soon.

Please see the contribution instructions for more information.

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Dec 11, 2021
@hotate29
Copy link
Contributor Author

Oops, the test is failing, I'll check.

@hotate29
Copy link
Contributor Author

hotate29 commented Dec 11, 2021

The test now succeeds.

@hotate29 hotate29 marked this pull request as draft December 15, 2021 14:23
@hotate29 hotate29 marked this pull request as ready for review December 16, 2021 13:48
…g#7320

When inverting an expression, the output is now like ```foo != 0``` instead of ```!(foo == 0)```, the comparison operator is now replaced.
@hotate29 hotate29 changed the title update: "Sugg::not()" replacing the comparison operator. #7320 update: Sugg::not() replacing the comparison operator. #7320 Dec 17, 2021
@hotate29
Copy link
Contributor Author

Tweak the commit message and title.

@camsteffen camsteffen added S-waiting-on-author Status: This is awaiting some action from the author. (Use `@rustbot ready` to update this status) and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties labels Dec 18, 2021
clippy_lints/src/floating_point_arithmetic.rs Show resolved Hide resolved
clippy_lints/src/loops/manual_memcpy.rs Outdated Show resolved Hide resolved
clippy_lints/src/needless_bool.rs Show resolved Hide resolved
clippy_lints/src/ranges.rs Show resolved Hide resolved
clippy_utils/src/sugg.rs Outdated Show resolved Hide resolved
clippy_utils/src/sugg.rs Outdated Show resolved Hide resolved
clippy_utils/src/sugg.rs Outdated Show resolved Hide resolved
clippy_utils/src/sugg.rs Outdated Show resolved Hide resolved
clippy_utils/src/sugg.rs Outdated Show resolved Hide resolved
tests/ui/needless_bool/fixable.rs Outdated Show resolved Hide resolved
Copy link
Contributor

@camsteffen camsteffen left a comment

Choose a reason for hiding this comment

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

Thank you for addressing all the comments! This looks great now. Please squash some commits.

@hotate29
Copy link
Contributor Author

I squashed.

@camsteffen
Copy link
Contributor

Thanks! @bors r+

@bors
Copy link
Collaborator

bors commented Dec 27, 2021

📌 Commit a172439 has been approved by camsteffen

@bors
Copy link
Collaborator

bors commented Dec 27, 2021

⌛ Testing commit a172439 with merge c5f4e7f...

bors added a commit that referenced this pull request Dec 27, 2021
update: ```Sugg::not()``` replacing the comparison operator. #7320

fixes #7320

changelog: ```needless_bool```: Changed to make a smart suggestion.
@bors
Copy link
Collaborator

bors commented Dec 27, 2021

💥 Test timed out

@camsteffen
Copy link
Contributor

@bors retry

@bors
Copy link
Collaborator

bors commented Dec 28, 2021

⌛ Testing commit a172439 with merge c1cd64b...

@bors
Copy link
Collaborator

bors commented Dec 28, 2021

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: camsteffen
Pushing c1cd64b to master...

@bors bors merged commit c1cd64b into rust-lang:master Dec 28, 2021
@hotate29
Copy link
Contributor Author

@giraffate @camsteffen Thanks for the review!

@hotate29 hotate29 deleted the issue7320 branch December 28, 2021 22:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-author Status: This is awaiting some action from the author. (Use `@rustbot ready` to update this status)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

needless_bool fix suggestion can trigger nonminimal_bool lint
5 participants