Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
MIR-borrowck: emit "`foo` does not live long enough" instead of borrow errors #45989
referenced this pull request
Nov 14, 2017
I didn't get a chance to look closely, but I wanted to point you at this gist:
It describes how to update the existing AST borrow check tests so that we can simultaneously test: (a) the current behavior on stable and (b) the behavior with MIR-borrowck enabled and compare the two. It'd be helpful if you update a test or two to show how the current PR behaves.
So, in terms of how to change the error message. The current error message arises from this call here:
Note that we pass
That will then flow down to this case:
You can see that
The other cases invoke similar helpers, but they use shallow wrappers like
Rebased on top of the conflicting changes and to squash my own commits. Error message now looks more or less what we're seeing with the
Edit: I have no idea how bors works apparently.