Skip to content
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

Closed
wants to merge 1 commit into from

Conversation

kellda
Copy link
Contributor

@kellda kellda commented Jul 25, 2020

Fixes #631

For now only least is implemented, I'm not sure how to implement fast

@rust-highfive
Copy link

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.

Comment on lines +22 to +29
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;
Copy link
Member

@JohnTitor JohnTitor Jul 25, 2020

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.

Copy link
Contributor Author

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

Copy link
Member

@JohnTitor JohnTitor Jul 25, 2020

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.

Copy link
Contributor Author

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

@kellda kellda closed this Aug 9, 2020
@kellda kellda deleted the least_fast_types branch August 9, 2020 16:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Provide support for fast integer types
3 participants