-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Improve f32
and f64
primitive documentation
#74621
Conversation
Did I break highfive? |
Very nice doc improvement, thanks! r=me once CI pass (I'm wary of the links check). |
39079ee
to
f0a04e5
Compare
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.
(force push fixed footnote typo)
src/libstd/primitive_docs.rs
Outdated
/// | ||
/// This type can represent a wide range of decimal numbers, like `3.5`, `27`, | ||
/// `-113.75`, `0.0078125`, `34359738368`, `0`, `-1`. So unlike integer types | ||
/// (like `i32`), floating point types can represent non-integer numbers, too. |
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.
unlike followed by (like ...) made me stop reading the sentence for a moment to ensure that I am parsing it correctly, i.e. whether it meant but like .... perhaps it could be replaced with (such as ...) or (e.g. ...) or removed altogether.
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.
Good idea, thanks for the feedback! I pushed the "such as" suggestion.
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.
Odd, I'm not seeing that in the merge commit.
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.
Oh damn, I think I screwed up a force push. None of the review-fixes are included :(
Will open a follow up PR to fix all of them.
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.
See #75400
f0a04e5
to
35a9940
Compare
35a9940
to
fa70245
Compare
☔ The latest upstream changes (presumably #73265) made this pull request unmergeable. Please resolve the merge conflicts. |
fa70245
to
e4d27fa
Compare
r? @KodrAus |
@bors r=GuillaumeGomez |
📌 Commit e4d27fa has been approved by |
☀️ Test successful - checks-actions, checks-azure |
All of these were review comments in rust-lang#74621 that I first fixed in that PR, but later accidentally overwrote by a force push.
/// it is considered infectious as almost all calculations where one of the | ||
/// operands is NaN will also result in NaN. | ||
/// | ||
/// For more information on floating point numbers, see [Wikipedia][wikipedia]. | ||
/// | ||
/// *[See also the `std::f32::consts` module](f32/consts/index.html).* |
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.
Shouldn't we bold just the text?
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.
This is consistent with for example
rust/library/core/src/num/i32.rs
Line 3 in 4b9ac51
//! *[See also the `i32` primitive type](../../std/primitive.i32.html).* |
…rAus Fix minor things in the `f32` primitive docs All of these were review comments in rust-lang#74621 that I first fixed in that PR, but later accidentally overwrote by a force push. Thanks @the8472 for noticing. r? @KodrAus
…rAus Fix minor things in the `f32` primitive docs All of these were review comments in rust-lang#74621 that I first fixed in that PR, but later accidentally overwrote by a force push. Thanks @the8472 for noticing. r? @KodrAus
I noticed that the docs for the primitive floats were fairly short. I first only wanted to add the IEEE specification information (compare the reference), but then also added some more beginner-friendly docs. Let me know what you think!
Random doc team assign:
r? @rylev