f32::from_str
and f64::from_str
: parser returned error on just a '.' (a dot)
#44242
Labels
A-docs
Area: documentation for any part of the project, including the compiler, standard library, and tools
C-bug
Category: This is a bug.
E-easy
Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
E-mentor
Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.
Hi! I found a mismatch between documentation and behavior of stable Rust.
When I tried to parse a string equal
"."
f32/f64::from_str
returnedErr(...)
instead ofOk(0.0)
, as it states in official documentation here.Tests (based on mentioned doc)
f32
: https://play.rust-lang.org/?gist=c7495df140e0991473fb914b0b468b34&version=stablef64
: https://play.rust-lang.org/?gist=c319d2f10762767b9983907cb9d7f2dc&version=stableThe text was updated successfully, but these errors were encountered: