-
Notifications
You must be signed in to change notification settings - Fork 559
Guarantee the binary representation of isize explicitly
#2064
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
base: master
Are you sure you want to change the base?
Guarantee the binary representation of isize explicitly
#2064
Conversation
| r[type.numeric.int.size.isize] | ||
| The `isize` type is a signed integer type with the same number of bits as the | ||
| The `isize` type is a signed two's complement integer type with the same number of bits as the |
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.
I didn't reflow the paragraph as the policy seems to be to not wrap long lines anymore (which I prefer anyway).
|
Since we guarantee this for fixed-width signed integers already, it seems clear that we should guarantee it for @rfcbot fcp merge |
|
Team member @tmandry has proposed to merge this. The next step is review by the rest of the tagged team members: No concerns currently listed. Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up! cc @rust-lang/lang-advisors: FCP proposed for lang, please feel free to register concerns. |
|
@rfcbot reviewed |
isize explicitlyisize explicitly
|
🔔 This is now entering its final comment period, as per the review above. 🔔 |
Following the discussion in rust-lang/rust#147960, this adds an explicit guarantee that
isizeis represented with two's complement.This is not intended as a new guarantee, but only as stating what is already mentioned in other places of the reference in the same place as it is for fixed-width integer types:
r? @traviscross