-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Identical arguments on assert macro family #6167
Conversation
r? @Manishearth (rust_highfive has picked a reviewer for you, use r? to override) |
I've been looking at |
r? @ebroto since you've already started, feel free to bounce back the review if you're busy! |
2 things:
|
Ok I will implement #4694 in this PR 😉
It doesn't lint, because |
f95b2ee
to
9009016
Compare
9009016
to
5a13217
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like we have to split the eq_op
tests in order to avoid the stderr file limit.
👀 oops will do. By the way, in #4694 (comment), @flip1995 was wishing the following:
Is it still wanted? |
3e2e1e8
to
16b5f37
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it still wanted?
I would say so, but I think it can be left for a follow-up PR. This is already an improvement on Clippy's toolset, and a cool enhancement of the lint. Thank you!
@bors r+ |
📋 Looks like this PR is still in progress, ignoring approval. Hint: Remove WIP from this PR's title when it is ready for review. |
@bors r+ |
📌 Commit 16b5f37 has been approved by |
☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test |
Awesome! Thanks for implementing this :) |
Lint when identical args are used on
assert_eq!
,debug_assert_eq!
,assert_ne!
anddebug_assert_ne!
macros.Added to the lint
eq_op
.Common functions added to
utils/higher.rs
Fixes: #3574
Fixes: #4694
changelog: Lint on identical args when calling
assert_eq!
,debug_assert_eq!
,assert_ne!
anddebug_assert_ne!
macros