Skip to content

make cast_possible_wrap work correctly for 16 bit {u,i}size #10564

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

Merged
merged 2 commits into from
Jun 7, 2023

Conversation

asquared31415
Copy link
Contributor

These changes make cast_possible_wrap aware of the different pointer widths and fixes the implementation to print the correct pointer widths.

Fixes #9337

changelog: cast_possible_wrap does not lint on u8 as isize or usize as i8, since these can never wrap.
cast_possible_wrap now properly considers 16 bit pointer size and prints the correct bit widths.

… wrap, and make it work correctly for 16 bit {u,i}size
@rustbot
Copy link
Collaborator

rustbot commented Mar 29, 2023

r? @flip1995

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

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Mar 29, 2023
@asquared31415
Copy link
Contributor Author

r? rust-lang/clippy

It has been a couple months, and there hasn't been a review, so rerolling, unless there's another process to request a review?

@rustbot rustbot assigned giraffate and unassigned flip1995 May 31, 2023
Copy link
Contributor

@giraffate giraffate left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks good, thanks!

Can we add the note about usize and isize are at least 16-bits wide. in the reference?
#9337 (comment)

@giraffate
Copy link
Contributor

@bors r+

Thanks!

@bors
Copy link
Contributor

bors commented Jun 6, 2023

📌 Commit 7cd0ec5 has been approved by giraffate

It is now in the queue for this repository.

@bors
Copy link
Contributor

bors commented Jun 6, 2023

⌛ Testing commit 7cd0ec5 with merge c8a0565...

@bors
Copy link
Contributor

bors commented Jun 7, 2023

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: giraffate
Pushing c8a0565 to master...

@bors bors merged commit c8a0565 into rust-lang:master Jun 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties
Projects
None yet
Development

Successfully merging this pull request may close these issues.

cast_possible_wrap for convertion from u8 to isize
5 participants