Improve doc comments for f32::ceil() and f32::floor()#156392
Open
Wilfred wants to merge 1 commit intorust-lang:mainfrom
Open
Improve doc comments for f32::ceil() and f32::floor()#156392Wilfred wants to merge 1 commit intorust-lang:mainfrom
Wilfred wants to merge 1 commit intorust-lang:mainfrom
Conversation
Collaborator
|
rustbot has assigned @Mark-Simulacrum. Use Why was this reviewer chosen?The reviewer was selected based on:
|
Previously ::floor() included an example showing behaviour for negative values, but ::ceil() did not. Ensure both have examples of the negative case, for both f32 and f64. Whilst we're here, tweak the wording slightly so it reads better.
Member
|
@bors r+ rollup |
Contributor
JonathanBrouwer
added a commit
to JonathanBrouwer/rust
that referenced
this pull request
May 10, 2026
…mulacrum Improve doc comments for f32::ceil() and f32::floor() Previously ::floor() included an example showing behaviour for negative values, but ::ceil() did not. Ensure both have examples of the negative case, for both f32 and f64. Whilst we're here, tweak the wording slightly so it reads better.
rust-bors Bot
pushed a commit
that referenced
this pull request
May 10, 2026
…uwer Rollup of 8 pull requests Successful merges: - #156196 (Include vendored sources in the rust-src component) - #156357 (tests: ip*_properties: avoid parsing the IP over and over again) - #156389 (prepare fs tests for miri) - #153975 (remove forever-deprecated and hidden `f64` methods) - #156147 (Update ICU4X to 2.2) - #156375 (kernel_copy tests: properly join background threads) - #156282 (Update `sysinfo` version to `0.39.0`) - #156392 (Improve doc comments for f32::ceil() and f32::floor())
GuillaumeGomez
added a commit
to GuillaumeGomez/rust
that referenced
this pull request
May 11, 2026
…mulacrum Improve doc comments for f32::ceil() and f32::floor() Previously ::floor() included an example showing behaviour for negative values, but ::ceil() did not. Ensure both have examples of the negative case, for both f32 and f64. Whilst we're here, tweak the wording slightly so it reads better.
rust-bors Bot
pushed a commit
that referenced
this pull request
May 11, 2026
Rollup of 6 pull requests Successful merges: - #153975 (remove forever-deprecated and hidden `f64` methods) - #156147 (Update ICU4X to 2.2) - #156375 (kernel_copy tests: properly join background threads) - #155946 (Refuse to push changes with a dirty git client) - #156282 (Update `sysinfo` version to `0.39.0`) - #156392 (Improve doc comments for f32::ceil() and f32::floor())
JonathanBrouwer
added a commit
to JonathanBrouwer/rust
that referenced
this pull request
May 11, 2026
…mulacrum Improve doc comments for f32::ceil() and f32::floor() Previously ::floor() included an example showing behaviour for negative values, but ::ceil() did not. Ensure both have examples of the negative case, for both f32 and f64. Whilst we're here, tweak the wording slightly so it reads better.
JonathanBrouwer
added a commit
to JonathanBrouwer/rust
that referenced
this pull request
May 11, 2026
…mulacrum Improve doc comments for f32::ceil() and f32::floor() Previously ::floor() included an example showing behaviour for negative values, but ::ceil() did not. Ensure both have examples of the negative case, for both f32 and f64. Whilst we're here, tweak the wording slightly so it reads better.
rust-bors Bot
pushed a commit
that referenced
this pull request
May 11, 2026
…uwer Rollup of 7 pull requests Successful merges: - #156147 (Update ICU4X to 2.2) - #156375 (kernel_copy tests: properly join background threads) - #155946 (Refuse to push changes with a dirty git client) - #156282 (Update `sysinfo` version to `0.39.0`) - #156384 (Remove some dead code for dumping MIR for a single DefId) - #156392 (Improve doc comments for f32::ceil() and f32::floor()) - #156411 (bootstrap: Don't panic on `x install --set build.extended=true`)
Member
|
Cc @tgross35 -- f16 and f128 docs are getting out of sync from f32/f64 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Previously ::floor() included an example showing behaviour for negative values, but ::ceil() did not. Ensure both have examples of the negative case, for both f32 and f64.
Whilst we're here, tweak the wording slightly so it reads better.