It might be interesting to try to model the intended "sandwich-style" error messages, which would not only pinpoint the point of borrow and point of illegal use, but also a later use of the reference that is keeping it alive. Presumably we could find this by starting a BFS from the point of error, seeking out points where a relevant inference constraint was added.
It might be interesting to try to model the intended "sandwich-style" error messages, which would not only pinpoint the point of borrow and point of illegal use, but also a later use of the reference that is keeping it alive. Presumably we could find this by starting a BFS from the point of error, seeking out points where a relevant inference constraint was added.