-
Notifications
You must be signed in to change notification settings - Fork 13.9k
Rename *exact_{div,shr,shl} to *{div,shr,shl}_exact
#147771
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
base: master
Are you sure you want to change the base?
Conversation
|
rustbot has assigned @Mark-Simulacrum. Use |
|
r? libs-api |
Return `Option` from `exact_div` and inherit overflow checks According to #139911 (comment), `exact_div` should return `Option::None` if `self % rhs != 0`, panic if `rhs == 0`, and handle overflow conditionally (panic in debug, wrap in release). #147771 should rename `exact_div` to `div_exact`.
7b1a960 to
f590ae6
Compare
|
This PR was rebased onto a different master commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
Return `Option` from `exact_div` and inherit overflow checks According to rust-lang/rust#139911 (comment), `exact_div` should return `Option::None` if `self % rhs != 0`, panic if `rhs == 0`, and handle overflow conditionally (panic in debug, wrap in release). rust-lang/rust#147771 should rename `exact_div` to `div_exact`.
Return `Option` from `exact_div` and inherit overflow checks According to rust-lang/rust#139911 (comment), `exact_div` should return `Option::None` if `self % rhs != 0`, panic if `rhs == 0`, and handle overflow conditionally (panic in debug, wrap in release). rust-lang/rust#147771 should rename `exact_div` to `div_exact`.
Return `Option` from `exact_div` and inherit overflow checks According to rust-lang/rust#139911 (comment), `exact_div` should return `Option::None` if `self % rhs != 0`, panic if `rhs == 0`, and handle overflow conditionally (panic in debug, wrap in release). rust-lang/rust#147771 should rename `exact_div` to `div_exact`.
Return `Option` from `exact_div` and inherit overflow checks According to rust-lang/rust#139911 (comment), `exact_div` should return `Option::None` if `self % rhs != 0`, panic if `rhs == 0`, and handle overflow conditionally (panic in debug, wrap in release). rust-lang/rust#147771 should rename `exact_div` to `div_exact`.
Return `Option` from `exact_div` and inherit overflow checks According to rust-lang/rust#139911 (comment), `exact_div` should return `Option::None` if `self % rhs != 0`, panic if `rhs == 0`, and handle overflow conditionally (panic in debug, wrap in release). rust-lang/rust#147771 should rename `exact_div` to `div_exact`.
Related to #144336 and #139911, see #139911 (comment). I haven't touched the
exact_div,exact_udivandexact_sdivintrinsics. Let me know if I should.