-
Notifications
You must be signed in to change notification settings - Fork 13.3k
method has an incompatible type for trait due to lifetimes has too wide a span #33624
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
Comments
Current output:
|
Current output:
It fails to point at the |
Triage: no change. |
The output from:
is:
The spans indicated are now much shorter but none seem to indicate the 'a that was originally suggested, thus I am not sure if we can agree to close the issue. |
Yeah, the ticket should not be closed as now the shorter span is actively not pointing at where it should be pointing. I'm happy with the output you show above in general compared to what it used to be, but it can be better. |
Has anyone resolved this? I'm very new to rust, so maybe I'm missing an obvious solution, but what's the work around for this? I tried expanding the Before I started learning rust I heard everyone talking about how much the borrow checker is a pain, but so far the only struggle has been these ****ing lifetimes. Any help is greatly appreciated, even if it is only a bandaid for now. |
Things move on, so with:
I get:
Which is similar to the messages from 1.84 but in a different order with the "2,8" block last rather than first.
Now since this sample is designed to reproduce a compiler problem with the least code, this "fixed" code may well be doing something entirely at odds with the intent of the original code that highlighted the compiler problem, so the error messages may still not be optimal. |
For
it would be much more useful if we spanned the offending lifetime rather than the whole method: i.e. like this
instead of
The text was updated successfully, but these errors were encountered: