Skip to content

i128 support#140

Merged
alexcrichton merged 4 commits intorust-random:masterfrom
TimNN:i128-support
Feb 27, 2017
Merged

i128 support#140
alexcrichton merged 4 commits intorust-random:masterfrom
TimNN:i128-support

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