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

Make float parsing docs more comprehensive #94838

Merged
merged 1 commit into from Mar 12, 2022

Conversation

antonok-edm
Copy link
Contributor

I was working on some code with some specialized restrictions on float parsing. I noticed the doc comments for f32::from_str and f64::from_str were missing several cases of valid inputs that are otherwise difficult to discover without looking at source code.

I'm not sure if the doc comments were initially intended to contain a comprehensive description of valid inputs, but I figured it's useful to include these extra cases for reference.

@rust-highfive
Copy link
Collaborator

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @yaahc (or someone else) soon.

Please see the contribution instructions for more information.

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Mar 11, 2022
@Dylan-DPC
Copy link
Member

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Mar 11, 2022

📌 Commit 4c17217 has been approved by Dylan-DPC

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 11, 2022
Dylan-DPC added a commit to Dylan-DPC/rust that referenced this pull request Mar 11, 2022
…an-DPC

Make float parsing docs more comprehensive

I was working on some code with some specialized restrictions on float parsing. I noticed the doc comments for `f32::from_str` and `f64::from_str` were missing several cases of valid inputs that are otherwise difficult to discover without looking at source code.

I'm not sure if the doc comments were initially intended to contain a comprehensive description of valid inputs, but I figured it's useful to include these extra cases for reference.
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 11, 2022
Rollup of 7 pull requests

Successful merges:

 - rust-lang#87618 (Add missing documentation for std::char types)
 - rust-lang#94769 (Collapse blanket and auto-trait impls by default)
 - rust-lang#94798 (`parse_tt` refactorings)
 - rust-lang#94818 (Rename `IntoFuture::Future` to `IntoFuture::IntoFuture`)
 - rust-lang#94827 (CTFE/Miri: detect out-of-bounds pointers in offset_from)
 - rust-lang#94838 (Make float parsing docs more comprehensive)
 - rust-lang#94839 (Suggest using double colon when a struct field type include single colon)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit ad51354 into rust-lang:master Mar 12, 2022
@rustbot rustbot added this to the 1.61.0 milestone Mar 12, 2022
@antonok-edm antonok-edm deleted the float-parse-docs branch March 12, 2022 01:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants