-
Notifications
You must be signed in to change notification settings - Fork 13.3k
blame the furthest statement in borrowck errors #113917
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
Conversation
LL | Self { field } | ||
| ^^^^^ this usage requires that `'a` must outlive `'1` | ||
| ^^^^^^^^^^^^^^ associated function was supposed to return data with lifetime `'a` but it is returning data with lifetime `'1` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Most of the changes seem to be perfectly reasonable, except the ones where we are now pointing to an entire struct expression instead of the field. This reduces the amount of actionable information a little bit, making people have to go to the struct's definition. This might be a worthwhile "regression", but would you be interested in exploring if we could improve these cases as part of this PR?
Switching to waiting on author to incorporate changes. Feel free to request a review with @rustbot author |
Does this help with the example I had in #112519? |
☔ The latest upstream changes (presumably #118107) made this pull request unmergeable. Please resolve the merge conflicts. |
@aliemjay any updates on this? |
Closing this as inactive. Feel free to reöpen this pr or create a new pr if you get the time to work on this. Thanks |
This should generate a more correct span for lifetime errors.
Fixes #113041
r? @estebank