-
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
Add docs for saturating integer arithmetic. #23254
Conversation
r? @huonw (rust_highfive has picked a reviewer for you, use r? to override) |
@@ -345,6 +345,16 @@ pub trait Int | |||
|
|||
/// Saturating integer addition. Computes `self + other`, saturating at | |||
/// the numeric bounds instead of overflowing. | |||
/// | |||
/// # Example |
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.
These should be 'examples'
r=me with two nits, thanks! |
Thanks for the comments. I've updated the branch. On a related note, I noticed other examples have the same issues that you mentioned. Would it be too pedantic if I corrected those in another pull request? |
I've been trying to play 'boy scout rule' with them, but if you'd like to clean them up, I'd love that. |
oh, and would you mind squashing these please? thanks |
This was added for rust-lang#23241.
6683b9c
to
62be565
Compare
I squashed the commits. I also sent a pull request to remove the Rust syntax highlighting from the example docs. |
As suggested by @steveklabnik in rust-lang#23254, I removed the redundant Rust syntax highlighting from the documentation.
Is anything else needed to close this pull request? Thanks. |
@bors: r+ |
📌 Commit 62be565 has been approved by |
Whoops, sorry about that! Sometimes these things slip. Thank you! |
…veklabnik This was added for rust-lang#23241.
⌛ Testing commit 62be565 with merge e98e391... |
This was added for #23241.