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

Fix issue 31109 #31410

Merged
merged 6 commits into from
Feb 6, 2016
Merged

Fix issue 31109 #31410

merged 6 commits into from
Feb 6, 2016

Conversation

hanna-kruppe
Copy link
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
Collaborator

r? @nikomatsakis

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

@hanna-kruppe
Copy link
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
Contributor Author

Changed to span_bug.

@pnkfelix
Copy link
Member

pnkfelix commented Feb 5, 2016

@bors r+

@bors
Copy link
Contributor

bors commented Feb 5, 2016

📌 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
Copy link
Contributor

bors commented Feb 6, 2016

⌛ 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
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