-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsArea: Documentation for any part of the project, including the compiler, standard library, and toolsC-bugCategory: This is a bug.Category: This is a bug.E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.E-mentorCall for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.
Description
Hi! I found a mismatch between documentation and behavior of stable Rust.
When I tried to parse a string equal "."
f32/f64::from_str
returned Err(...)
instead of Ok(0.0)
, as it states in official documentation here.
Tests (based on mentioned doc)
f32
: https://play.rust-lang.org/?gist=c7495df140e0991473fb914b0b468b34&version=stable
f64
: https://play.rust-lang.org/?gist=c319d2f10762767b9983907cb9d7f2dc&version=stable
Metadata
Metadata
Assignees
Labels
A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsArea: Documentation for any part of the project, including the compiler, standard library, and toolsC-bugCategory: This is a bug.Category: This is a bug.E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.E-mentorCall for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.
Type
Projects
Milestone
Relationships
Development
Select code repository
Activity
hanna-kruppe commentedon Sep 1, 2017
This is a docs issue. The libs team decided in #30344 to consider
"."
an invalid input instead of parsing it as 0.steveklabnik commentedon Sep 1, 2017
I'd be happy to mentor anyone who wants to fix this, it'd be a great first bug!
mcomstock commentedon Sep 1, 2017
I'd like to work on this.
Freyskeyd commentedon Sep 4, 2017
@mcomstock are you fixing this?
mcomstock commentedon Sep 4, 2017
Yeah! Sorry for the delay.
Freyskeyd commentedon Sep 4, 2017
@mcomstock ok let me know if you need help
Rollup merge of rust-lang#44328 - mcomstock:from-str-doc-fix, r=steve…
Rollup merge of rust-lang#44328 - mcomstock:from-str-doc-fix, r=steve…