-
Notifications
You must be signed in to change notification settings - Fork 14k
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
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`.
…tolnay Return `Option` from `exact_div` and inherit overflow checks According to rust-lang#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#147771 should rename `exact_div` to `div_exact`.
|
r? @dtolnay |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
|
@bors r+ |
Rename `*exact_{div,shr,shl}` to `*{div,shr,shl}_exact`
Related to rust-lang#144336 and rust-lang#139911, see rust-lang#139911 (comment). I haven't touched the `exact_div`, `exact_udiv` and `exact_sdiv` intrinsics. Let me know if I should.
Rename `*exact_{div,shr,shl}` to `*{div,shr,shl}_exact`
Related to rust-lang#144336 and rust-lang#139911, see rust-lang#139911 (comment). I haven't touched the `exact_div`, `exact_udiv` and `exact_sdiv` intrinsics. Let me know if I should.
…tolnay Return `Option` from `exact_div` and inherit overflow checks According to rust-lang#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#147771 should rename `exact_div` to `div_exact`.
Rename `*exact_{div,shr,shl}` to `*{div,shr,shl}_exact`
Related to rust-lang#144336 and rust-lang#139911, see rust-lang#139911 (comment). I haven't touched the `exact_div`, `exact_udiv` and `exact_sdiv` intrinsics. Let me know if I should.
Rename `*exact_{div,shr,shl}` to `*{div,shr,shl}_exact`
Related to rust-lang#144336 and rust-lang#139911, see rust-lang#139911 (comment). I haven't touched the `exact_div`, `exact_udiv` and `exact_sdiv` intrinsics. Let me know if I should.
Rename `*exact_{div,shr,shl}` to `*{div,shr,shl}_exact`
Related to rust-lang#144336 and rust-lang#139911, see rust-lang#139911 (comment). I haven't touched the `exact_div`, `exact_udiv` and `exact_sdiv` intrinsics. Let me know if I should.
Rollup of 16 pull requests Successful merges: - #141470 (Add new `function_casts_as_integer` lint) - #143619 (`c_variadic`: Add future-incompatibility warning for `...` arguments without a pattern outside of `extern` blocks) - #146495 (rustdoc: Erase `#![doc(document_private_items)]`) - #147771 (Rename `*exact_{div,shr,shl}` to `*{div,shr,shl}_exact`) - #147833 (rustdoc-json: move `target` to `json::conversions`) - #147952 (Add a timeout to the `remote-test-client` connection) - #147955 (compiletest: Migrate `TestProps` directive handling to a system of named handlers) - #148480 (Add `Steal::risky_hack_borrow_mut`) - #148506 (Special case detecting `'static` lifetime requirement coming from `-> Box<dyn Trait>`) - #148508 (Provide more context when mutably borrowing an imutably borrowed value) - #148530 (update the bootstrap readme) - #148608 (Add test for --test-builder success path) - #148636 (bootstrap: respect `build.python` on macOS) - #148639 (test(rustdoc): move tests into jump-to-def) - #148647 (Check unsafety for non-macro attributes in `validate_attr`) - #148667 (a few small clippy fixes) r? `@ghost` `@rustbot` modify labels: rollup
Rollup of 16 pull requests Successful merges: - #141470 (Add new `function_casts_as_integer` lint) - #143619 (`c_variadic`: Add future-incompatibility warning for `...` arguments without a pattern outside of `extern` blocks) - #146495 (rustdoc: Erase `#![doc(document_private_items)]`) - #147771 (Rename `*exact_{div,shr,shl}` to `*{div,shr,shl}_exact`) - #147833 (rustdoc-json: move `target` to `json::conversions`) - #147952 (Add a timeout to the `remote-test-client` connection) - #147955 (compiletest: Migrate `TestProps` directive handling to a system of named handlers) - #148480 (Add `Steal::risky_hack_borrow_mut`) - #148506 (Special case detecting `'static` lifetime requirement coming from `-> Box<dyn Trait>`) - #148508 (Provide more context when mutably borrowing an imutably borrowed value) - #148530 (update the bootstrap readme) - #148608 (Add test for --test-builder success path) - #148636 (bootstrap: respect `build.python` on macOS) - #148639 (test(rustdoc): move tests into jump-to-def) - #148647 (Check unsafety for non-macro attributes in `validate_attr`) - #148667 (a few small clippy fixes) r? `@ghost` `@rustbot` modify labels: rollup
Rollup of 15 pull requests Successful merges: - #141470 (Add new `function_casts_as_integer` lint) - #143619 (`c_variadic`: Add future-incompatibility warning for `...` arguments without a pattern outside of `extern` blocks) - #146495 (rustdoc: Erase `#![doc(document_private_items)]`) - #147771 (Rename `*exact_{div,shr,shl}` to `*{div,shr,shl}_exact`) - #147833 (rustdoc-json: move `target` to `json::conversions`) - #147955 (compiletest: Migrate `TestProps` directive handling to a system of named handlers) - #148480 (Add `Steal::risky_hack_borrow_mut`) - #148506 (Special case detecting `'static` lifetime requirement coming from `-> Box<dyn Trait>`) - #148508 (Provide more context when mutably borrowing an imutably borrowed value) - #148530 (update the bootstrap readme) - #148608 (Add test for --test-builder success path) - #148636 (bootstrap: respect `build.python` on macOS) - #148639 (test(rustdoc): move tests into jump-to-def) - #148647 (Check unsafety for non-macro attributes in `validate_attr`) - #148667 (a few small clippy fixes) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of #147771 - nxsaken:div_shlr_exact, r=dtolnay Rename `*exact_{div,shr,shl}` to `*{div,shr,shl}_exact` Related to #144336 and #139911, see #139911 (comment). I haven't touched the `exact_div`, `exact_udiv` and `exact_sdiv` intrinsics. Let me know if I should.
Rollup of 15 pull requests Successful merges: - rust-lang/rust#141470 (Add new `function_casts_as_integer` lint) - rust-lang/rust#143619 (`c_variadic`: Add future-incompatibility warning for `...` arguments without a pattern outside of `extern` blocks) - rust-lang/rust#146495 (rustdoc: Erase `#![doc(document_private_items)]`) - rust-lang/rust#147771 (Rename `*exact_{div,shr,shl}` to `*{div,shr,shl}_exact`) - rust-lang/rust#147833 (rustdoc-json: move `target` to `json::conversions`) - rust-lang/rust#147955 (compiletest: Migrate `TestProps` directive handling to a system of named handlers) - rust-lang/rust#148480 (Add `Steal::risky_hack_borrow_mut`) - rust-lang/rust#148506 (Special case detecting `'static` lifetime requirement coming from `-> Box<dyn Trait>`) - rust-lang/rust#148508 (Provide more context when mutably borrowing an imutably borrowed value) - rust-lang/rust#148530 (update the bootstrap readme) - rust-lang/rust#148608 (Add test for --test-builder success path) - rust-lang/rust#148636 (bootstrap: respect `build.python` on macOS) - rust-lang/rust#148639 (test(rustdoc): move tests into jump-to-def) - rust-lang/rust#148647 (Check unsafety for non-macro attributes in `validate_attr`) - rust-lang/rust#148667 (a few small clippy fixes) r? `@ghost` `@rustbot` modify labels: rollup
Related to #144336 and #139911, see #139911 (comment). I haven't touched the
exact_div,exact_udivandexact_sdivintrinsics. Let me know if I should.