-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Refactor casts lint #6873
Refactor casts lint #6873
Conversation
r? @llogiq (rust-highfive has picked a reviewer for you, use r? to override) |
1645295
to
9e631da
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!
match cast_to.kind() { | ||
ty::Uint(_) | ty::Int(..) => { /* continue on */ }, | ||
_ => return, | ||
} |
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 would be nice to go over the code and do some clean up. As an example: This would be nicer to do with
if !matches!(cast_to.kind(), ty::Uint(_) | ty::Int(..)) {
return;
}
But this shouldn't be done in this PR.
@bors r+ p=1 |
📌 Commit 9e631da has been approved by |
☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test |
Ref: #6724
Changes:
casts
group from thetypes
group.casts
group into their own modules.Notes:
fix
Usespan_lint_and_sugg
instead ofspan_lint
inunnecessary_cast
#6874 in order to maintain this PR as small as possible.changelog: none