Functions and closures with incorrect return types should have better diagnostics #41897
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
We should do better on the diagnostic in this case, since presumably the author of the code meant to return the 10, so we should suggest that the function needs a return type, somewhat as we currently give the "remove
;
" suggestion.Filing this to close out #35478, #21838, #22216, #18595 as duplicates of this.
The text was updated successfully, but these errors were encountered: