Skip to content

Fix issue 31109#31410

Merged
bors merged 6 commits into
rust-lang:masterfrom
hanna-kruppe:issue31109
Feb 6, 2016
Merged

Fix issue 31109#31410
bors merged 6 commits into
rust-lang:masterfrom
hanna-kruppe:issue31109

Conversation

@hanna-kruppe

Copy link
Copy Markdown
Contributor

Issue #31109 uncovered two semi-related problems:

  • A panic in str::parse::<f64>
  • A panic in rustc::middle::const_eval::lit_to_const where the result of float parsing was unwrapped.

This series of commits fixes both issues and also drive-by-fixes some things I noticed while tracking down the parsing panic.

Robin Kruppe added 5 commits February 4, 2016 16:24
Using f64's bit size probably wasn't actually *wrong*, but it would overshoot for no reason. This might have slowed down f32 parsing significantly.
The code there still triggers an ICE, but for different reasons (const eval unwraps the parse result).
@rust-highfive

Copy link
Copy Markdown
Contributor

r? @nikomatsakis

(rust_highfive has picked a reviewer for you, use r? to override)

@hanna-kruppe

Copy link
Copy Markdown
Contributor Author

r? @pnkfelix

cc @oli-obk

Ideally float parsing wouldn't fail at all, but for the moment let's give a helpful message.

Fixes rust-lang#31109
@hanna-kruppe

Copy link
Copy Markdown
Contributor Author

Changed to span_bug.

@pnkfelix

pnkfelix commented Feb 5, 2016

Copy link
Copy Markdown
Contributor

@bors r+

@bors

bors commented Feb 5, 2016

Copy link
Copy Markdown
Collaborator

📌 Commit a76cb45 has been approved by pnkfelix

bors added a commit that referenced this pull request Feb 6, 2016
Issue #31109 uncovered two semi-related problems:

* A panic in `str::parse::<f64>`
* A panic in `rustc::middle::const_eval::lit_to_const` where the result of float parsing was unwrapped.

This series of commits fixes both issues and also drive-by-fixes some things I noticed while tracking down the parsing panic.
@bors

bors commented Feb 6, 2016

Copy link
Copy Markdown
Collaborator

⌛ Testing commit a76cb45 with merge 695c907...

@bors bors merged commit a76cb45 into rust-lang:master Feb 6, 2016
@bors bors mentioned this pull request Feb 6, 2016
@hanna-kruppe hanna-kruppe deleted the issue31109 branch February 2, 2026 22:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants