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

i128 support #140

Merged
merged 4 commits into from
Feb 27, 2017
Merged

i128 support #140

merged 4 commits into from
Feb 27, 2017

Conversation

TimNN
Copy link
Contributor

@TimNN TimNN commented Feb 26, 2017

This PR implements Rand for i128 and u128. Some notes:

  • Should Rng gain a next_u128 method?

    This may be desirable in case a Rng can directly produce 128 bit wide outputs.

  • Currently i128 support is enabled using a single feature flag, which may not be the best solution:

    We probably need two different feature flags in the future: one to enable the i128 impls and one for toggling the #![feature(i128_type)] (i128_type will hopefully become stable in the near future, so #![feature(i128_type)] will not be needed but the impls will still need to be disabled for older rust versions without i128 support).

    An alternative would be to automatically enable the features for supporting rust versions using a build script. This would be my preferred solution I think, although I don't know what the policy is for using build scripts like this.

  • I'm not completely sure about the travis changes.

Fixes #139.

r? @alexcrichton

(If you want the fixme update in a separate PR, please tell me).

@alexcrichton
Copy link
Contributor

Looks great to me, thanks!

@alexcrichton alexcrichton merged commit 9ba6797 into rust-random:master Feb 27, 2017
@TimNN TimNN deleted the i128-support branch February 27, 2017 19:39
pitdicker pushed a commit to pitdicker/rand that referenced this pull request Apr 4, 2018
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.

Options to generate 128-bit integers
2 participants