Skip to content

Conversation

@AudaciousAxiom
Copy link

Following the discussion in rust-lang/rust#147960, this adds an explicit guarantee that isize is 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:

Remember that signed integers are always represented using two's complement.

r? @traviscross

@rustbot rustbot added the S-waiting-on-review Status: The marked PR is awaiting review from a maintainer label Oct 25, 2025
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
Copy link
Author

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review Status: The marked PR is awaiting review from a maintainer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants