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

Add the other overloadable operations to suspicious_arithmetic_impl #5884

Merged
merged 5 commits into from
Aug 12, 2020

Conversation

Ryan1729
Copy link
Contributor

In #2268 I idly mused that the other user-overloadable operations could be added to this lint. Knowing that the lint was arguably incomplete was gnawing at the back of my mind, so I figured that I might as well make this PR, particularly given the change needed was so small.

changelog: Start warning on suspicious implementations of the BitAnd, BitOr, BitXor, Rem, Shl, and Shr traits.

@rust-highfive
Copy link

r? @phansch

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Aug 10, 2020
@flip1995
Copy link
Member

Can you add tests for the new cases?

r? @flip1995

@rust-highfive rust-highfive assigned flip1995 and unassigned phansch Aug 12, 2020
@flip1995 flip1995 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 Aug 12, 2020
In rust-lang#2268 I idly mused that the other user-overloadable operations could be added to this lint. Knowing that the lint was arguably incomplete was gnawing at the back of my mind, so I figured that I might as well make this PR, particularly given the change needed was so small.
Should have actually ran rustfmt on it, rather than attempting to fix it manually
@flip1995
Copy link
Member

@bors r+

Thanks!

@bors
Copy link
Collaborator

bors commented Aug 12, 2020

📌 Commit 7bd7a46 has been approved by flip1995

@bors
Copy link
Collaborator

bors commented Aug 12, 2020

⌛ Testing commit 7bd7a46 with merge 439bae6...

@bors
Copy link
Collaborator

bors commented Aug 12, 2020

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: flip1995
Pushing 439bae6 to master...

@bors bors merged commit 439bae6 into rust-lang:master Aug 12, 2020
@Ryan1729 Ryan1729 deleted the patch-1 branch August 13, 2020 10:10
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.

None yet

5 participants