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

extend NLL with preliminary support for free regions on functions #45668

Merged
merged 11 commits into from
Nov 7, 2017

Conversation

nikomatsakis
Copy link
Contributor

@nikomatsakis nikomatsakis commented Oct 31, 2017

This PR extends #45538 with support for free regions. This is pretty preliminary and will no doubt want to change in various ways, particularly as we add support for closures, but it's enough to get the basic idea in place:

  • We now create specific regions to represent each named lifetime declared on the function.
  • Region values can contain references to these regions (represented for now as a BTreeSet<RegionIndex>).
  • If we wind up trying to infer that 'a: 'b must hold, but no such relationship was declared, we report an error.

It also does a number of drive-by refactorings.

r? @arielb1

cc @spastorino

@kennytm kennytm added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Nov 1, 2017
@nikomatsakis nikomatsakis changed the title [WIP] extend NLL with preliminary support for free regions on functions extend NLL with preliminary support for free regions on functions Nov 2, 2017
@kennytm kennytm added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Nov 2, 2017
This lets us inspect the regions we infer around named arguments.
Actually, I meant to make this use `delay_span_bug`
@carols10cents
Copy link
Member

review ping @arielb1, pinging you on IRC too!

@arielb1
Copy link
Contributor

arielb1 commented Nov 6, 2017

@bors r+

@bors
Copy link
Contributor

bors commented Nov 6, 2017

📌 Commit 7b4282e has been approved by arielb1

@nikomatsakis
Copy link
Contributor Author

@bors p=1

Giving this higher priority because it's a building block for other PRs in/around non-lexical lifetimes, and because NLL in general is a very high priority item.

@bors
Copy link
Contributor

bors commented Nov 6, 2017

⌛ Testing commit 7b4282e with merge 785643a...

bors added a commit that referenced this pull request Nov 6, 2017
extend NLL with preliminary support for free regions on functions

This PR extends #45538 with support for free regions. This is pretty preliminary and will no doubt want to change in various ways, particularly as we add support for closures, but it's enough to get the basic idea in place:

- We now create specific regions to represent each named lifetime declared on the function.
- Region values can contain references to these regions (represented for now as a `BTreeSet<RegionIndex>`).
- If we wind up trying to infer that `'a: 'b` must hold, but no such relationship was declared, we report an error.

It also does a number of drive-by refactorings.

r? @arielb1

cc @spastorino
@kennytm kennytm 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 Nov 7, 2017
@bors
Copy link
Contributor

bors commented Nov 7, 2017

☀️ Test successful - status-appveyor, status-travis
Approved by: arielb1
Pushing 785643a to master...

@bors bors merged commit 7b4282e into rust-lang:master Nov 7, 2017
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.

6 participants