-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Improve primitive integers documentation #34709
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
Conversation
@@ -307,6 +309,8 @@ macro_rules! int_impl { | |||
/// wrapping the truncated bits to the beginning of the resulting | |||
/// integer. | |||
/// | |||
/// Please note this isn't the same operation than `>>`! |
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.
Replace "than" with "as"
e29fe24
to
041fa81
Compare
While this is certainly an improvement, I don't think it fixes the issue. Not every single method has an example yet, for instance. |
(that doesn't mean we shouldn't merge it, but the "Fixes" should get removed from the commit message/description) |
Then wait for what comes next! |
041fa81
to
3f4ebfb
Compare
Updated. |
/// | ||
/// # Examples | ||
/// | ||
/// Basic usage: |
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.
We didn't accept this as a standard, so these shouldn't be added.
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.
I did it to keep file consistency. The RFC isn't merged yet so for now I prefer to make it like other doc comments in this file. However, I can update other if you want.
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.
I would rather not add more, as I'm gonna have to go back and remove them soon, and this just creates more work 😄
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.
Then sure! ;)
3f4ebfb
to
a6bbd0c
Compare
Updated. |
@bors: r+ rollup |
📌 Commit a6bbd0c has been approved by |
Improve primitive integers documentation Fixes #29335. r? @steveklabnik
Fixes #29335.
r? @steveklabnik