blame the furthest statement in borrowck errors#113917
blame the furthest statement in borrowck errors#113917aliemjay wants to merge 1 commit intorust-lang:masterfrom
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.
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