-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Specify pointer-sized integers a bit more #16715
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
Comments
It's already specified enough that those are guarantees. It's not possible to have a larger array because there's a guarantee of it being contiguous and addressable via pointer arithmetic. I don't think the documentation needs to spell out some of the consequences of it being pointer-size. |
– Rust Reference Manual (2014-09-17) This is the only thing I see that specifies |
Agreed. |
E. g. specify that the largest possible array of
u8
-sized elements has a length that fits into anint
, additionally require thati8 <= int
, so that abnormal overflow conditions don't need to be checked, such as in #16701.The text was updated successfully, but these errors were encountered: