-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Add unchecked math inherant impls to integers #63923
Conversation
(rust_highfive has picked a reviewer for you, use r? to override) |
Honestly, I'd be fine having these be They'd be less easy to reach for if they weren't available as methods and had to be used as e.g. |
As long as we're using |
What's the purpose and use case for these functions, as opposed to functions guaranteed to have wrapping semantics? |
@joshtriplett better optimization -- see the original PR to add the intrinsics. |
Ping from triage Thanks. |
I'm going to close this and include it in the use case for now as an |
This exposes the
unchecked_add
andunchecked_sub
intrinsics on integers.If we agree we want this, I'll make a tracking issue and point the
#[unstable]
attributes at it.This would be used by #62886 at a minimum.