-
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
Add lint for explicit deref and deref_mut method calls #5226
Conversation
8e0ba68
to
edb0798
Compare
c4ac113
to
ed02e83
Compare
☔ The latest upstream changes (presumably #5230) made this pull request unmergeable. Please resolve the merge conflicts. |
ed02e83
to
d524ef1
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.
Can you add a few more tests for some of the expression types listed in ExprPrecedence
853c015
to
1468303
Compare
☔ The latest upstream changes (presumably #5319) made this pull request unmergeable. Please resolve the merge conflicts. |
1468303
to
f21f5fb
Compare
☔ The latest upstream changes (presumably #5380) made this pull request unmergeable. Please resolve the merge conflicts. |
f21f5fb
to
d558792
Compare
☔ The latest upstream changes (presumably #5294) made this pull request unmergeable. Please resolve the merge conflicts. |
d558792
to
b79ddac
Compare
☔ The latest upstream changes (presumably #5398) made this pull request unmergeable. Please resolve the merge conflicts. |
3b9429c
to
481c662
Compare
☔ The latest upstream changes (presumably #5438) made this pull request unmergeable. Please resolve the merge conflicts. |
72f3c22
to
fbfed04
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.
Thanks! This looks really good. Just some cleanup left to do.
Sorry for taking so long for the review. I don't have an excuse, just wasn't really motivated to review PRs recently. |
fbfed04
to
14a8842
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.
Thanks!
It's totally fine not to instant review PRs 😉 |
14a8842
to
3c2bbcf
Compare
@bors r+ rollup |
📌 Commit 3c2bbcf has been approved by |
🌲 The tree is currently closed for pull requests below priority 1, this pull request will be tested once the tree is reopened |
Rollup of 5 pull requests Successful merges: - #5226 (Add lint for explicit deref and deref_mut method calls) - #5248 (Add lint on large non scalar const) - #5430 (Disallow bit-shifting in integer_arithmetic) - #5466 (large_enum_variant: Report sizes of variants) - #5468 (Zero single char names) Failed merges: r? @ghost changelog: rollup
This PR adds the lint
explicit_deref_method
that suggests replacingderef()
andderef_mut()
with&*a
and&mut *a
.It doesn't lint inside macros.
This PR is the continuation of #3258.
changelog: Add lint
explicit_deref_method
.Fixes: #1566