Skip to content
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

Document panics on unsigned wrapping_div/rem calls (#116063) #116075

Merged
merged 2 commits into from
Sep 24, 2023

Conversation

Colonial-Dev
Copy link
Contributor

@Colonial-Dev Colonial-Dev commented Sep 22, 2023

Add missing # Panics sections to the uint_impl! macro, documenting that the wrapping_rem/div calls will panic if passed zero.

@rustbot
Copy link
Collaborator

rustbot commented Sep 22, 2023

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @Mark-Simulacrum (or someone else) soon.

Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (S-waiting-on-review and S-waiting-on-author) stays updated, invoking these commands when appropriate:

  • @rustbot author: the review is finished, PR author should check the comments and take action accordingly
  • @rustbot review: the author is ready for a review, this PR will be queued again in the reviewer's queue

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Sep 22, 2023
@Colonial-Dev Colonial-Dev changed the title Resolve #116063 Document panics on unsigned wrapping_rem (#116063) Sep 22, 2023
@lukas-code
Copy link
Member

The same should also be added to wrapping_div, wrapping_div_euclid and wrapping_rem_euclid.

@Colonial-Dev Colonial-Dev changed the title Document panics on unsigned wrapping_rem (#116063) Document panics on unsigned wrapping_div/rem calls (#116063) Sep 22, 2023
@Mark-Simulacrum
Copy link
Member

@bors r+

Technically this is new stable documentation but removing the panic in the future feels like a potentially compatible change, and this is more likely to be a mistake in the docs than intentional omission.

@bors
Copy link
Contributor

bors commented Sep 23, 2023

📌 Commit f286a75 has been approved by Mark-Simulacrum

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Sep 23, 2023
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request 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 pull request 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
Copy link
Contributor

bors commented Sep 24, 2023

⌛ Testing commit f286a75 with merge 44bd31c...

@bors
Copy link
Contributor

bors commented Sep 24, 2023

☀️ Test successful - checks-actions
Approved by: Mark-Simulacrum
Pushing 44bd31c to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Sep 24, 2023
@bors bors merged commit 44bd31c into rust-lang:master Sep 24, 2023
11 checks passed
@rustbot rustbot added this to the 1.74.0 milestone Sep 24, 2023
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (44bd31c): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
1.0% [0.7%, 1.1%] 3
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.0% [-2.4%, -1.2%] 5
All ❌✅ (primary) - - 0

Cycles

This benchmark run did not return any relevant results for this metric.

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 629.264s -> 630.239s (0.15%)
Artifact size: 317.13 MiB -> 317.10 MiB (-0.01%)

@Colonial-Dev Colonial-Dev deleted the issue-116063-fix branch September 24, 2023 19:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants