-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
wrapping_rem
methods should document panic-on-zero
#116063
Labels
A-docs
Area: documentation for any part of the project, including the compiler, standard library, and tools
Libs-Small
Libs issues that are considered "small" or self-contained
T-libs
Relevant to the library team, which will review and decide on the PR/issue.
Comments
yoshuawuyts
added
the
A-docs
Area: documentation for any part of the project, including the compiler, standard library, and tools
label
Sep 22, 2023
rustbot
added
the
needs-triage
This issue may need triage. Remove it if it has been sufficiently triaged.
label
Sep 22, 2023
saethlin
added
T-libs
Relevant to the library team, which will review and decide on the PR/issue.
Libs-Small
Libs issues that are considered "small" or self-contained
and removed
needs-triage
This issue may need triage. Remove it if it has been sufficiently triaged.
labels
Sep 22, 2023
It seems that this is correctly documented for the signed integer types, but not the unsigned ones. So a quick copy-paste should be sufficient. |
@rustbot claim |
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this issue
Sep 23, 2023
…ark-Simulacrum Document panics on unsigned wrapping_div/rem calls (rust-lang#116063) Add missing `# Panics` sections to the `uint_impl!` macro, documenting that the `wrapping_rem/div` calls will panic if passed zero.
bors
added a commit
to rust-lang-ci/rust
that referenced
this issue
Sep 24, 2023
…iaskrgr Rollup of 5 pull requests Successful merges: - rust-lang#115794 (Do not create a DerefLen place for `Box<[T]>`.) - rust-lang#116069 (Fix debug printing of tuple) - rust-lang#116075 (Document panics on unsigned wrapping_div/rem calls (rust-lang#116063)) - rust-lang#116076 (Add Zba, Zbb, and Zbs as target features for riscv64-linux-android) - rust-lang#116078 (Add assembly test to make sure that inlining works as expected when closures inherit target features) r? `@ghost` `@rustbot` modify labels: rollup
bors
added a commit
to rust-lang-ci/rust
that referenced
this issue
Sep 24, 2023
…k-Simulacrum Document panics on unsigned wrapping_div/rem calls (rust-lang#116063) Add missing `# Panics` sections to the `uint_impl!` macro, documenting that the `wrapping_rem/div` calls will panic if passed zero.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-docs
Area: documentation for any part of the project, including the compiler, standard library, and tools
Libs-Small
Libs issues that are considered "small" or self-contained
T-libs
Relevant to the library team, which will review and decide on the PR/issue.
Location
All
wrapping_rem
methods.Summary
As reported in yoshuawuyts/futures-concurrency#156, when calling the
wrapping_rem
functions with a value of0
, a panic is triggered. The documentation of thewrapping_rem
method should include a# panic
section making note of this.Example
playground
The text was updated successfully, but these errors were encountered: