-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NLL: need to capture and present causes that led to region constraints #51188
Comments
We have to get a handle on this. @davidtwco and I have been working on it. |
Things have gotten a lot better here. The only real diagnostic issue remaining with https://github.com/rust-lang/rust/blob/master/src/test/ui/in-band-lifetimes/impl/dyn-trait.nll.stderr is that it talks about "closures" when there is no closure in the source code from the view point of the end developer. |
@rust-lang/wg-compiler-nll It looks like this issue might be done? Perhaps someone could take a look and update the current state. |
I'm going to close this issue now. I re-opened #51175 which seem relevant. |
Consider the test in-band-lifetimes/impl/dyn-trait.rs.
For AST-borrowck we produce this output dyn-trait.stderr:
but for NLL we currently produce this output dyn-trait.nll.stderr:
One can debate how much utility the end user gets from the potential overload of lines that the AST-borrowck note generates, but it is certainly more useful than the output that NLL is currently generated.
At its heart, the issue here is that NLL currently builds up a set of constraints and tells us if it couldn't resolve them, but it fails to present the causes that led to that constraint set.
The text was updated successfully, but these errors were encountered: