Improve lifetime error with return value #44875
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
WG-diagnostics
Working group: Diagnostics
Hello!
(this shall be considered an item under #42516)
While me and @nikomatsakis were working on #42701 we've discovered that this case is not handled properly. (properly: didn't use new lifetime error messages)
This currently shows a
error[E0495]: cannot infer an appropriate lifetime for borrow expression due to conflicting requirements
. It should show one of theE06XX
errors instead.@nikomatsakis said that fix might be dependent on this: #44124
So, this issue is a reminder for us to fix that case. Any help is more than welcome!
🍻
The text was updated successfully, but these errors were encountered: