[pull] master from rust-num:master#8
Open
pull[bot] wants to merge 231 commits intomesalock-linux:masterfrom
Open
[pull] master from rust-num:master#8pull[bot] wants to merge 231 commits intomesalock-linux:masterfrom
pull[bot] wants to merge 231 commits intomesalock-linux:masterfrom
Conversation
Some WrappingNeg tests rely on core::ops::Neg being implemented for core::num::Wrapping<_>. Since it was only added in Rust 1.10, this causes the build to fail for version 1.8 (the MSRV). The problematic tests have been replaced with a TODO. Ideally, if and when the MSRV reaches 1.10, it will be a simple matter of reverting this commit to bring back the tests.
153: Add WrappingNeg trait r=cuviper a=ocstl Closes #10 A quick search turned up that the [extprim](https://github.com/kennytm/extprim) implements `PrimInt` for its `u128` and `i128`, but, since both have their own `wrapping_neg` method, it's a non-issue. That being said, I don't know for certain that it is the only project that implements `PrimInt`, so it might be wise to wait for a larger version bump before merging this. Co-authored-by: Olivier Chassé St-Laurent <oliviercsl@gmail.com> Co-authored-by: Josh Stone <cuviper@gmail.com>
These correspond to the `extra_log_consts` added in Rust 1.43.
165: Add saturating_mul() and refactor Saturating into subtraits. Fixes #40. r=cuviper a=trepetti Hi all, Taking the suggestion from #40, this pull request breaks out the saturating trait into three separate SaturatingAdd, SaturatingSub and SaturatingMul traits, borrowing the idea from Checked* and Wrapping*. In terms of native ops, SaturatingNeg would be an option on signed types once the saturating_neg() API is stable on signed integer primitives. I know there is concern about breaking changes, so I was thinking that I could add a wrapping Saturating trait for backwards compatibility that retains the original functionality: ``` pub trait Saturating: SaturatingAdd + SaturatingSub {} impl<T> Saturating for T where T: SaturatingAdd + SaturatingSub {} ``` This is not included in the current version, but I would be happy to add. -Tom (trepetti@cs.columbia.edu) 171: Add FloatConst::{LOG10_2, LOG2_10} r=cuviper a=cuviper These correspond to the `extra_log_consts` added in Rust 1.43. Co-authored-by: Tom Repetti <trepetti@cs.columbia.edu> Co-authored-by: Josh Stone <cuviper@gmail.com>
Use namespaced-features to safely bump to MSRV 1.60
Implementing clamp for Float trait
Release 0.2.19
Co-authored-by: Josh Stone <cuviper@gmail.com>
…t-integer-decoder Clarify example for trait method `float::Float::integer_decode`
Remove the implication that wrapping is the default behaviour.
- Remove the implication that wrapping is the default behaviour for `CheckedEuclid` methods. - Replace mentions of 'underflow' with 'overflow'.
Fix checked operations documentation.
Downgrade libm for CI
Implement Bounded, ToPrimitive, NumCast, FromPrimitive for NonZero*
Implement Zero, One, and Num for core::num::Saturating<T>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot]
Can you help keep this open source service alive? 💖 Please sponsor : )