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

Add docs for saturating integer arithmetic. #23254

Merged
merged 1 commit into from
Mar 20, 2015

Conversation

jbcrail
Copy link
Contributor

@jbcrail jbcrail commented Mar 10, 2015

This was added for #23241.

@rust-highfive
Copy link
Collaborator

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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These should be 'examples'

@steveklabnik
Copy link
Member

r=me with two nits, thanks!

@jbcrail
Copy link
Contributor Author

jbcrail commented Mar 11, 2015

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?

@steveklabnik
Copy link
Member

I've been trying to play 'boy scout rule' with them, but if you'd like to clean them up, I'd love that.

@steveklabnik
Copy link
Member

oh, and would you mind squashing these please? thanks

@jbcrail
Copy link
Contributor Author

jbcrail commented Mar 13, 2015

I squashed the commits. I also sent a pull request to remove the Rust syntax highlighting from the example docs.

Manishearth added a commit to Manishearth/rust that referenced this pull request Mar 17, 2015
 As suggested by @steveklabnik in rust-lang#23254, I removed the redundant Rust syntax highlighting from the documentation.
@jbcrail
Copy link
Contributor Author

jbcrail commented Mar 19, 2015

Is anything else needed to close this pull request? Thanks.

@steveklabnik
Copy link
Member

@bors: r+

@bors
Copy link
Contributor

bors commented Mar 19, 2015

📌 Commit 62be565 has been approved by steveklabnik

@steveklabnik
Copy link
Member

Whoops, sorry about that! Sometimes these things slip. Thank you!

Manishearth added a commit to Manishearth/rust that referenced this pull request Mar 20, 2015
@bors
Copy link
Contributor

bors commented Mar 20, 2015

⌛ Testing commit 62be565 with merge e98e391...

bors added a commit that referenced this pull request Mar 20, 2015
@bors bors merged commit 62be565 into rust-lang:master Mar 20, 2015
@jbcrail jbcrail deleted the saturating-math-docs branch March 20, 2015 15:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants