You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
By the way: I do not want to borrow any longer than necessary because it can lead to unnecessary borrowck errors (not for @, but for ~). I did start a patch to borrow @ for longer than ~ but decided against it in the end.
However, I have an alternate plan: basically we create a region variable that is lower-bounded with the region of the call (that is the current length of the borrow). Then we upper bound it with the enclosing block—or, in fact, with the innermost "looping" enclosing block. The standard region inference stuff should then pick the smallest possible block that fits these constraints. I put some of the required machinery in but not all of it yet.
It would be very nice if we could borrow for the whole block when borrowing an @ when passing it as a function parameter.
Also if we could say what we think the liveness ranges are that would help the error messages.
The text was updated successfully, but these errors were encountered: