Improve diagnostics like "incompatible types: expected fn item, found a different fn item" #102608
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
D-newcomer-roadblock
Diagnostics: Confusing error or lint; hard to understand for new users.
E-mentor
Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Uh oh!
There was an error while loading. Please reload this page.
Given the following code (playground):
The current output is:
I would like this error to explain why these are incompatible despite having the same signature (or link to an explanation).
I would also like it to suggest an alternative, perhaps one of these:
&double
to&(double as fn(u32) -> u32)
&double
todouble
The text was updated successfully, but these errors were encountered: