-
-
Notifications
You must be signed in to change notification settings - Fork 15.1k
Don't treat tuple struct types as functions in diagnostics #114247
Copy link
Copy link
Open
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsD-confusingDiagnostics: Confusing error or lint that should be reworked.Diagnostics: Confusing error or lint that should be reworked.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsD-confusingDiagnostics: Confusing error or lint that should be reworked.Diagnostics: Confusing error or lint that should be reworked.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Code
Current output
Desired output
error[E0423]: expected value, found struct `A`Rationale and extra context
Since i never defined a function, it seems odd to get errors mentioning the function signature. While the example code is pretty clean, in more complex cases this can be a very confusing message
Other cases
consider the following error a user of the Bevy game engine received and was confused by, where there is no hint of the Person struct needing to be instantiated.
Anything else?
No response