Fill in missing parts of Integer overflow API #24420
Merged
bors merged 4 commits intorust-lang:masterfrom Apr 17, 2015
Merged
Conversation
`wrapping_div`, `wrapping_rem`, `wrapping_neg`, `wrapping_shl`, `wrapping_shr`. All marked unstable under `core` feature for now (with expectation of being marked as stable by 1.0 release).
See discussion, albeit one-sided, in: rust-lang/rfcs#964
Contributor
|
(rust_highfive has picked a reviewer for you, use r? to override) |
15 tasks
Contributor
Author
|
See also my notes at rust-lang/rfcs#964 ... or rather, skim them, because there is a change to |
Contributor
Author
|
This is now ready for review, and it would be nice for it to be in the next beta. |
Contributor
Author
|
r? @aturon |
Member
Collaborator
|
⌛ Testing commit 0610ee4 with merge 6c0d434... |
Collaborator
|
💔 Test failed - auto-mac-32-opt |
Contributor
Author
|
d'oh; I should have done testing for 32-bit targets as well. Working to address this now. |
bors
added a commit
that referenced
this pull request
Apr 16, 2015
Add conditional overflow-checking to signed negate operator. I argue this can land independently of #24420 , because one can write the implementation of `wrapped_neg()` inline if necessary (as illustrated in two cases on this PR). This needs to go into beta channel.
(The cast from the 64-bit value to isize was using the lower 32-bits, which led to it being treated as a large positive value rather than a smallish negative one. The fix was to use the same bits for the upper- and lower- 32 bits.)
Contributor
Author
bors
added a commit
that referenced
this pull request
Apr 17, 2015
Fill in missing parts of Integer overflow API See todo list at #22020
Collaborator
Collaborator
bors
added a commit
that referenced
this pull request
Apr 17, 2015
Add conditional overflow-checking to signed negate operator. I argue this can land independently of #24420 , because one can write the implementation of `wrapped_neg()` inline if necessary (as illustrated in two cases on this PR). This needs to go into beta channel.
lambda-fairy
added a commit
to lambda-fairy/wrapping_macros
that referenced
this pull request
Apr 21, 2015
Contributor
Author
|
not accepted for beta. |
Contributor
|
(because it only adds unstable API features) |
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.
Fill in missing parts of Integer overflow API
See todo list at #22020