Suggesting adding lifetime to return type #94492
Labels
A-borrow-checker
Area: The borrow checker
A-diagnostics
Area: Messages for errors, warnings, and lints
A-suggestion-diagnostics
Area: Suggestions generated by the compiler applied by `cargo fix`
P-low
Low priority
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
When there is a (elided) lifetime mismatch, we output a hint to introduce a lifetime but the hint does not suggest adding a lifetime to the return type.
Given the following code:
The current output is:
Ideally the output should also suggest adding
'a
to the return type:The text was updated successfully, but these errors were encountered: