-
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
cast_possible_truncation
Suggest TryFrom when truncation possible
#10038
Conversation
r? @Jarcho (rustbot has picked a reviewer for you, use r? to override) |
dc887c5
to
cf5db9a
Compare
cf5db9a
to
9612b19
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.
Just a couple of edge cases noted. Otherwise LGTM.
9612b19
to
4a70f65
Compare
4a70f65
to
5cb6246
Compare
Good points! I've rebased, since it has been over a month. All changes are in the last commit, as well as a test for the Thank you for your patience, when it came to the update :) |
Thank you. @bors r+ |
☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test |
I am a bit surprised that this was marked as closing #9231; at least I don't see a test for usize-to-u64 casts here. |
This fixes the last issues from #9664 as the author seems to be inactive. The PR author was sadly kept during the rebase, due to the conflict resolution.
IDK if it's worth it do to a full review, I only added the last commit, everything else remained the same, besides a rebase.
changelog: Sugg: [
cast_possible_truncation
]: Now suggests usingtry_from
or allowing the lint#10038
closes: #9231