Error message becomes worse when lifetime is elided via '_
#86759
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
A-lifetimes
Area: Lifetimes / regions
D-newcomer-roadblock
Diagnostics: Confusing error or lint; hard to understand for new users.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Given the following code:
The current output is:
However, if we explicitly name the lifetime:
the error message is much better:
We should emit the same error message when the lifetime is elided (referring to it as 'this elided lifetime' or something similar).
The text was updated successfully, but these errors were encountered: