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

Amend arith-oflo with wrapping_neg in the WrappingOps trait #963

Closed
pnkfelix opened this issue Mar 11, 2015 · 2 comments
Closed

Amend arith-oflo with wrapping_neg in the WrappingOps trait #963

pnkfelix opened this issue Mar 11, 2015 · 2 comments
Labels
T-libs-api Relevant to the library API team, which will review and decide on the RFC.

Comments

@pnkfelix
Copy link
Member

The tracking issue for RFC #560 , namely rust-lang/rust#22020, mentions implementing a wrapping_neg method, but no such method is part of the trait as defined in the RFC.

(Presumably just an oversight.)

@pnkfelix
Copy link
Member Author

(or oh, maybe that line item was a relatively recent addition...)

((also, @glaebhoerl already suggested potentially removing unary negation on unsigned integers as part of this, shown here: #560 (comment) ... it certainly feels a little strange to keep it with all of these other checks going in to ensure that you are doing "good" arithmetic.))

@petrochenkov petrochenkov added the T-libs-api Relevant to the library API team, which will review and decide on the RFC. label Jan 29, 2018
@petrochenkov
Copy link
Contributor

wrapping_neg is implemented now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-libs-api Relevant to the library API team, which will review and decide on the RFC.
Projects
None yet
Development

No branches or pull requests

2 participants