Skip to content

Flounder if truncation would happen #322

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

Merged
merged 4 commits into from
Jan 26, 2020

Conversation

jackh726
Copy link
Member

@jackh726 jackh726 commented Jan 14, 2020

Fixes #301 (this is caused by bad truncation)
cc. #302 (should fix many known cases of this, but theoretically the problem still exists)
cc. #318 (needs more investigation)

This keeps all existing truncation code intact, just doesn't use the resulting substs or goals. But could change it to short-circuit to a bool.

Could add some documentation to abstract_*_literal to explain why we discard the goal if it would get truncated, but overall changes are pretty minimal/complete.

@jackh726 jackh726 changed the title Truncate flounder Flounder if truncation would happen Jan 14, 2020
@nikomatsakis
Copy link
Contributor

@jackh726 this looks very good -- it needs rebase though. Ping me if you get a chance for that.

@jackh726
Copy link
Member Author

🤦‍♂️because I corrected a typo in the other PR. @nikomatsakis rebased

@nikomatsakis nikomatsakis merged commit af48f30 into rust-lang:master Jan 26, 2020
@jackh726 jackh726 deleted the truncate_flounder branch January 26, 2020 15:41
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.

panic: truncate extracted a pending value
2 participants