-
Couldn't load subscription status.
- Fork 13.9k
extend NLL with preliminary support for free regions on functions #45668
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
Conversation
9ca6dbe to
2288312
Compare
This way, NLL can report them later.
Notably, the (hitherto unused) `less_than` method was not at all what it purported to be. It in fact computes the opposite.
7bbf680 to
67c0eab
Compare
This lets us inspect the regions we infer around named arguments.
Actually, I meant to make this use `delay_span_bug`
67c0eab to
7b4282e
Compare
|
review ping @arielb1, pinging you on IRC too! |
|
@bors r+ |
|
📌 Commit 7b4282e has been approved by |
|
@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. |
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
|
☀️ Test successful - status-appveyor, status-travis |
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:
BTreeSet<RegionIndex>).'a: 'bmust hold, but no such relationship was declared, we report an error.It also does a number of drive-by refactorings.
r? @arielb1
cc @spastorino