-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Provide support for least
and fast
integer types
#1838
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @JohnTitor (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
pub type int_least8_t = i8; | ||
pub type int_least16_t = i16; | ||
pub type int_least32_t = i32; | ||
pub type int_least64_t = i64; | ||
pub type uint_least8_t = u8; | ||
pub type uint_least16_t = u16; | ||
pub type uint_least32_t = u32; | ||
pub type uint_least64_t = u64; |
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.
This should be in platfrom-dependent module e.g. unix
.
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 don't think it makes sense to duplicate it in platform-dependent modules because:
- It is the same for every supported target.
- The typedef being different than what is above would mean that some primitive type isn't available at all on a platform, which is very unlikely if ever it exists.
- If such a platform existed, it would be really unlikely to be targeted by Rust, as not beign able to use e.g. u8 would be very hard to handle.
- In any case it can always be moved later if ever a platform need other typedefs
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.
Hm, then I don't think we need them with the same reason as #1304.
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.
@alexcrichton said it was awaiting an implementation, but I'm fine with whatever decision is taken
Fixes #631
For now only
least
is implemented, I'm not sure how to implementfast