-
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
Tweak Library Integer Division Docs #119726
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @thomcc (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 (
|
Addresses #119682 |
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 for the PR! Can you split the different changes into different commits? It's a bit hard to review them all at once. Use @rustbot ready
when you've done that.
a0e94a2
to
76659ae
Compare
@rustbot ready |
Thanks! |
…iaskrgr Rollup of 9 pull requests Successful merges: - rust-lang#118714 ( Explanation that fields are being used when deriving `(Partial)Ord` on enums) - rust-lang#119710 (Improve `let_underscore_lock`) - rust-lang#119726 (Tweak Library Integer Division Docs) - rust-lang#119746 (rustdoc: hide modals when resizing the sidebar) - rust-lang#119986 (Fix error counting) - rust-lang#120194 (Shorten `#[must_use]` Diagnostic Message for `Option::is_none`) - rust-lang#120200 (Correct the anchor of an URL in an error message) - rust-lang#120203 (Replace `#!/bin/bash` with `#!/usr/bin/env bash` in rust-installer tests) - rust-lang#120212 (Give nnethercote more reviews) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#119726 - NCGThompson:div-overflow-doc, r=Nilstrieb Tweak Library Integer Division Docs Improved the documentation and diagnostics related to panicking in the division-like methods in std: * For signed methods that can overflow, clarified "results in overflow" to "self is -1 and rhs is Self::MIN." This is more concise than saying "results in overflow" and then explaining how it could overflow. * For floor/ceil_div, corrected the documentation and made it more like the documentation in other methods. * For signed methods that can overflow, explicitly mention that they are not affected by compiler flags. * Removed all unused rustc_inherit_overflow_checks attributes. The non-division-like operations will never overflow. * Added track_caller attributes to all methods that can panic. The panic messages will always be correct. For example, division methods all have / before %. * Edited the saturating_div documentation to be consistent with similar methods.
Improved the documentation and diagnostics related to panicking in the division-like methods in std: