Very hard to read error when returning ?
from closure not returning Result or Option
#69657
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
A-suggestion-diagnostics
Area: Suggestions generated by the compiler applied by `cargo fix`.
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
D-papercut
Diagnostics: An error or lint that needs small tweaks.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
The original code:
The fix was to return
Ok()
at the end of the closure:Ok((move |expr| constructor(expr, id), location))
. It would be much more helpful if the error message suggested returningOk()
at the end instead of spouting a wall of text at me.The text was updated successfully, but these errors were encountered: