-
Notifications
You must be signed in to change notification settings - Fork 128
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 #60
i128 #60
Conversation
Thanks! This will be nice to have with the upcoming You'll need to declare the feature in Do you plan on completing the rest of the applicable traits too? I notice at least |
Done.
I'd prefer to leave adding |
Any further feedback? What needs to be done to proceed? Do we want to proceed? The compiler (v1.8.0) also appears to trip over the
Any idea what to do about this? What is num-trait's stance on language backwards compatibility? |
I'd like to add the cast stuff -- just need to get around to it.
Does it work if you leave it as a bare
I take a firm stance on this, which is why it's so old at 1.8 right now. |
Awesome!
I removed the suffixes (from all invocations of The code now however (and despite being hidden behind a feature flag) fails to compile with:
🤔
👍 |
ci/test_full.sh
Outdated
|
||
# test `i128` | ||
cargo build --verbose --features=i128 | ||
cargo test --verbose --features=i128 |
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 will need to be conditioned on TRAVIS_RUST_VERSION
, so it's only attempted on Rust 1.26+ (currently just beta and nightly).
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.
So remove redundant …
$run cargo build --verbose
… from rustup.sh
?
And add …
if [[ "$TRAVIS_RUST_VERSION" =~ ^(nightly|beta|stable)$ ]]; then
cargo build --verbose --features=i128
cargo test --verbose --features=i128
fi
… to test_full.sh
?
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.
rustup.sh
should be harmless, but you can tweak that if you like. test_full.sh
is called directly in .travis.yml
-- I guess we could remove the redundant build there too. Doesn't really matter.
The condition looks fine, but I doubt stable
1.25 will work yet, as the feature was only recently stabilized for the upcoming 1.26.
This includes new conditional methods `ToPrimitive::{to_i128,to_u128}` and `FromPrimitive::{from_i128,from_u128}`. Since features can only be additive, these methods must not cause a breaking change to anyone when enabled -- thus they have a default implementation that converts through 64-bit values. Types that can do better with a full 128-bit integer, like bigint or floating-point, will probably want to override these.
@regexident - I've pushed 128-bit casts, and a few other things. I'd appreciate if you could look over my changes too! |
@cuviper looks good to me! 💪 |
Thanks! bors r+ |
Build succeeded |
FYI:
|
Yeah. 😢 I already reported this in https://github.com/onur/docs.rs/issues/23#issuecomment-388160926 |
No description provided.