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 ICE with generators and NLL #56460

Merged
merged 2 commits into from
Dec 7, 2018
Merged

Conversation

davidtwco
Copy link
Member

@davidtwco davidtwco commented Dec 3, 2018

Fix #55850.

This PR stops an ICE in #55850 by not panicking when a region cannot be named. However, this PR does not (yet) fix the underlying issue that the correct name for the test case provided for the issue (in this instance, 'a) was not found.

This PR also lays a little bit of groundwork by categorizing yields separately from returns so that region naming can be specialized for this case.

r? @pnkfelix

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Dec 3, 2018
@davidtwco davidtwco changed the title ICE with generators and NLL WIP: ICE with generators and NLL Dec 3, 2018
@pnkfelix pnkfelix changed the title WIP: ICE with generators and NLL Fix ICE with generators and NLL Dec 4, 2018
@pnkfelix
Copy link
Member

pnkfelix commented Dec 4, 2018

@bors r+

@bors
Copy link
Contributor

bors commented Dec 4, 2018

📌 Commit 9acfbb2 has been approved by pnkfelix

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Dec 4, 2018
pietroalbini added a commit to pietroalbini/rust that referenced this pull request Dec 5, 2018
Fix ICE with generators and NLL

Fix rust-lang#55850.

This PR stops an ICE in rust-lang#55850 by not panicking when a region cannot be named. However, this PR does not (yet) fix the underlying issue that the correct name for the test case provided for the issue (in this instance, `'a`) was not found.

This PR also lays a little bit of groundwork by categorizing yields separately from returns so that region naming can be specialized for this case.

r? @pnkfelix
@pietroalbini

This comment has been minimized.

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Dec 5, 2018
@davidtwco

This comment has been minimized.

@bors

This comment has been minimized.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Dec 6, 2018
@bors

This comment has been minimized.

@bors

This comment has been minimized.

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Dec 7, 2018
@rust-highfive

This comment has been minimized.

@davidtwco
Copy link
Member Author

Oops, didn’t realise this failed Travis when approving. Will fix shortly.

This commit adds a new `ConstraintCategory` for yield points - this
allows for differentiation between a normal return and a yield in the
diagnostics.
This commit puts a fix in place for the ICE in region naming code so
that it doesn't break the compiler. However, this results in the
diagnostic being poorer as the borrow explanation that was causing the
ICE is not being added - this should be fixed as a follow-up.
@davidtwco
Copy link
Member Author

@bors r=pnkfelix

@bors
Copy link
Contributor

bors commented Dec 7, 2018

📌 Commit 4a286d3 has been approved by pnkfelix

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Dec 7, 2018
@bors
Copy link
Contributor

bors commented Dec 7, 2018

⌛ Testing commit 4a286d3 with merge a40fded...

bors added a commit that referenced this pull request Dec 7, 2018
Fix ICE with generators and NLL

Fix #55850.

This PR stops an ICE in #55850 by not panicking when a region cannot be named. However, this PR does not (yet) fix the underlying issue that the correct name for the test case provided for the issue (in this instance, `'a`) was not found.

This PR also lays a little bit of groundwork by categorizing yields separately from returns so that region naming can be specialized for this case.

r? @pnkfelix
@bors
Copy link
Contributor

bors commented Dec 7, 2018

☀️ Test successful - status-appveyor, status-travis
Approved by: pnkfelix
Pushing a40fded to master...

@bors bors merged commit 4a286d3 into rust-lang:master Dec 7, 2018
@davidtwco davidtwco deleted the issue-55850 branch December 7, 2018 22:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ICE with generators and NLL
5 participants