Skip to content

Closure region hierarchy#23109

Merged
bors merged 4 commits into
rust-lang:masterfrom
nikomatsakis:closure-region-hierarchy
Apr 1, 2015
Merged

Closure region hierarchy#23109
bors merged 4 commits into
rust-lang:masterfrom
nikomatsakis:closure-region-hierarchy

Conversation

@nikomatsakis

Copy link
Copy Markdown
Contributor

Adjust internal treatment of the region hierarchy around closures. Work towards #3696.

r? @pnkfelix

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so, I know what this comment is saying because we've talked about it, but this sentence as written is too difficult to parse. (In particular, I worry about someone misparsing it as "... to compare (a region 'a from (a closure with a region 'b)) from (the fn that encloses it) ..."

I know that grammatically, that alternative parsing does not make sense. But I still think a rephrasing is in order; this stuff is hard enough to follow as it is.

Maybe even just putting in a few more names:

Let C be some closure and let F be the fn that encloses it. When we are asked to compare a region 'a from C with a region 'b from F, we can in fact assume 'b is the larger region. (Sort of.)

@pnkfelix

Copy link
Copy Markdown
Contributor

@nikomatsakis feel free to r=me after addressing the comment-nits I noted above.

its own disjoint region tree, and the new table encodes the lexical
relationships between those trees.
hierarchies are judged based on the lexical relationship of their
respective fn bodies.
case where `None` was returned should never happen in practice; it
amounts to comparing regions from two unrelated hierarchies. (I was also
not able to make it happen.)
@nikomatsakis nikomatsakis force-pushed the closure-region-hierarchy branch from 1411d06 to f15813d Compare April 1, 2015 12:41
@nikomatsakis

Copy link
Copy Markdown
Contributor Author

@bors r=pnkfelix f15813d

bors added a commit that referenced this pull request Apr 1, 2015
Adjust internal treatment of the region hierarchy around closures. Work towards #3696.

r? @pnkfelix
@bors

bors commented Apr 1, 2015

Copy link
Copy Markdown
Collaborator

⌛ Testing commit f15813d with merge d528aa9...

@bors

bors commented Apr 1, 2015

Copy link
Copy Markdown
Collaborator

@bors bors merged commit f15813d into rust-lang:master Apr 1, 2015
@nikomatsakis nikomatsakis deleted the closure-region-hierarchy branch March 30, 2016 16:12
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.

3 participants