-
-
Notifications
You must be signed in to change notification settings - Fork 14.2k
Closed as not planned
Labels
C-discussionCategory: Discussion or questions that doesn't represent real issues.Category: Discussion or questions that doesn't represent real issues.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.needs-triageThis issue may need triage. Remove it if it has been sufficiently triaged.This issue may need triage. Remove it if it has been sufficiently triaged.
Description
I tried this code:
use std::str::FromStr;
fn main() {
let x = 1_000_000_.3_e+____4;
let res = f64::from_str("1_000_000_.3_e+____4");
println!("{:?}", x);
println!("{:?}", res);
}I expected to see this happen:
10000003000.0
Ok(10000003000.0)
Instead, this happened:
10000003000.0
Err(ParseFloatError { kind: Invalid })
Meta
rustc --version --verbose:
rustc 1.92.0-nightly (fa3155a64 2025-09-30)
binary: rustc
commit-hash: fa3155a644dd62e865825087b403646be01d4cef
commit-date: 2025-09-30
host: aarch64-apple-darwin
release: 1.92.0-nightly
LLVM version: 21.1.2
Backtrace
<backtrace>
Metadata
Metadata
Assignees
Labels
C-discussionCategory: Discussion or questions that doesn't represent real issues.Category: Discussion or questions that doesn't represent real issues.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.needs-triageThis issue may need triage. Remove it if it has been sufficiently triaged.This issue may need triage. Remove it if it has been sufficiently triaged.