Added unchecked_div and unchecked_rem to signed and unsigned numerical types#137598
Added unchecked_div and unchecked_rem to signed and unsigned numerical types#137598madhav-madhusoodanan wants to merge 2 commits intorust-lang:mainfrom
unchecked_div and unchecked_rem to signed and unsigned numerical types#137598Conversation
unchecked_div and unchecked_rem to signed and unsigned numerical typesunchecked_div and unchecked_rem to signed and unsigned numerical types
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
ed68857 to
1a6551b
Compare
|
On the tracking issue I was mostly voicing conern about the naming, i.e. having two functions with the same name but different safety preconditions. |
Sky9x
left a comment
There was a problem hiding this comment.
Some of the requested changes are only on 1 of the functions, please make sure they are applied to all 4 (if applicable).
1a6551b to
dee4e5c
Compare
This comment has been minimized.
This comment has been minimized.
dee4e5c to
e5eddbd
Compare
This comment has been minimized.
This comment has been minimized.
e5eddbd to
2949b77
Compare
unchecked_div and unchecked_rem to signed and unsigned numerical typesunchecked_div and unchecked_rem to signed and unsigned numerical types
This comment has been minimized.
This comment has been minimized.
0878b5e to
5d40a59
Compare
unchecked_div and unchecked_rem to signed and unsigned numerical typesunchecked_div and unchecked_rem to signed and unsigned numerical types
Sky9x
left a comment
There was a problem hiding this comment.
LGTM!
Tip: You can collapse review comments by clicking on "Resolve Conversation" once you've addressed it
5d40a59 to
8d2a5b6
Compare
8d2a5b6 to
2c9342d
Compare
|
I would be grateful if you could please take a look at this PR @the8472. |
|
@the8472 friendly ping from wg-triage to review this |
| /// | ||
| /// [`unwrap_unchecked`]: option/enum.Option.html#method.unwrap_unchecked | ||
| #[doc = concat!("[`checked_div`]: ", stringify!($SelfT), "::checked_div")] | ||
| #[doc = concat!("[`wrapping_div`]: ", stringify!($SelfT), "::wrapping_div")] |
There was a problem hiding this comment.
This link seems unused, or am I missing something?
There was a problem hiding this comment.
Seems like we do, right? for checked_div and wrapping_div
There was a problem hiding this comment.
(Sorry for the delay in response from my side too)
| /// | ||
| /// [`unwrap_unchecked`]: option/enum.Option.html#method.unwrap_unchecked | ||
| #[doc = concat!("[`checked_div`]: ", stringify!($SelfT), "::checked_div")] | ||
| #[doc = concat!("[`wrapping_div`]: ", stringify!($SelfT), "::wrapping_div")] |
Context
Adds
unchecked_divandunchecked_remto signed and unsigned numerical types incore.This is an unstable addition.
Related Issue
unchecked_div_rem#136716