
1·
18 days agoI also asked about this on Reddit, but will/won’t closures complicate this? At the closure call site you’ll have to insert invalidations based on the body, which comes earlier in the body of the enclosing function. This indicates that you have to work inside-out for the borrow checking as well, so that a closure’s mutations_after_this and revived_after_this are known. Reassigning of closures outside can either replace these (if the assignment happens outside any control flow) or add to these (otherwise).
It’s not an insurmountable problem by any means, but it does sound like a pure backwards walk won’t be enough, maybe?
score 1 · canonical
Cool! Definitely complicates things a little, but nothing too hard!
score 1 · canonical