Closed RalfJung closed 7 years ago
I'm also re-thinking that approach. There are some comments, though a bit more "implementation focused", available in this issue https://github.com/nikomatsakis/nll/issues/12. In particular, I tried to sketch out an alternative model in this comment, but I have to try and work it out a bit more in depth to see if what I am saying makes any sense at all.
@RalfJung, does the latest writeup address your concerns? I'm inclined to close this issue now that we've updated and moved away from the "Extended CFG" approach.
Yes, that sounds much more like what I would have expected. Thanks :)
(This is essentially repeating what I wrote in the internals thread, 'cause it seems like this repo is now where we have the discussion.)
The one item in the proposal which leaves me most uneasy is the part about adding artificial nodes to the CFG to represent named external lifetimes. For example, to represent arbitrary lattices of lifetime inclusions, the artifical blocks may sometimes have multiple successors, making them look even more artificial.
Why did you even choose this interesting approach to handling external lifetimes? I would have expected something based more on the fact that return takes an argument of a particular type, giving rise to appropriate constraints.