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

Wrapping<T> needs many different impls to make it useable #30524

Closed
strega-nil opened this issue Dec 22, 2015 · 2 comments · Fixed by #30523
Closed

Wrapping<T> needs many different impls to make it useable #30524

strega-nil opened this issue Dec 22, 2015 · 2 comments · Fixed by #30523

Comments

@strega-nil
Copy link
Contributor

  • Rem
  • Shl
  • Shr
  • *Assign

Plus impl Op<T> for Wrapping<T>

@strega-nil
Copy link
Contributor Author

It really is just an oversight. Wrapping<T> is sadly overlooked :(

@strega-nil strega-nil changed the title Add Rem to Wrapping<T> Wrapping<T> needs many different impls to make it useable Dec 27, 2015
bors added a commit that referenced this issue Jan 4, 2016
Add OpAssign to Wrapping<T>, plus fix some problems in core::num::wrapping

including, but not limited to:

* Testing Wrapping<T>
* Pull out a lot of broken code that doesn't need to be there with the new stage0 compiler
* Adding Rem and RemAssign to Wrapping<T>
* Removed 3 (assumed accidental) re-exports, which is a minor [breaking-change].
* Change shl and shr to take all integer types, instead of a usize; this is a more major [breaking-change], because of values that were inferred before, but brings us in line with the integer shifts.

Fixes #30524 and #30523
bors added a commit that referenced this issue Jan 4, 2016
Add OpAssign to Wrapping<T>, plus fix some problems in core::num::wrapping

including, but not limited to:

* Testing Wrapping<T>
* Pull out a lot of broken code that doesn't need to be there with the new stage0 compiler
* Adding Rem and RemAssign to Wrapping<T>
* Removed 3 (assumed accidental) re-exports, which is a minor [breaking-change].
* Change shl and shr to take all integer types, instead of a usize; this is a more major [breaking-change], because of values that were inferred before, but brings us in line with the integer shifts.

Fixes #30524 and #30523
@Eh2406
Copy link
Contributor

Eh2406 commented Sep 3, 2017

There is a FIXME related to this issue,
https://github.com/rust-lang/rust/blob/master/src/test/run-pass/num-wrapping.rs#L70
https://github.com/rust-lang/rust/blob/master/src/test/run-pass/num-wrapping.rs#L176
Now that the issue is closed can the FIXME be fix, or made more specific?

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 a pull request may close this issue.

3 participants