-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Closed
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsA-parserArea: The lexing & parsing of Rust source code to an ASTArea: The lexing & parsing of Rust source code to an ASTA-patternsRelating to patterns and pattern matchingRelating to patterns and pattern matchingD-newcomer-roadblockDiagnostics: Confusing error or lint; hard to understand for new users.Diagnostics: Confusing error or lint; hard to understand for new users.D-papercutDiagnostics: An error or lint that needs small tweaks.Diagnostics: An error or lint that needs small tweaks.E-mentorCall for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.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.
Description
Code
I'm having trouble creating a concise example, but perhaps the error below is enough. If the error at least mentioned turbofish it'd have saved a bunch of heartache for a noob.
Current output
error: expected one of `)`, `,`, `@`, or `|`, found `<`
--> ....
|
143 | Ok(SomeEnum<STRICT>::SomeVariant { result, .. }) => { ... },
| ^
| |
| expected one of `)`, `,`, `@`, or `|`
| help: missing `,`
Desired output
" if SomeEnum<STRICT> is a type reference, use SomeEnum::<STRICT> instead"
Rationale and extra context
Rust is elsewhere good about suggesting the turbofish.
Other cases
No response
Anything else?
No response
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsA-parserArea: The lexing & parsing of Rust source code to an ASTArea: The lexing & parsing of Rust source code to an ASTA-patternsRelating to patterns and pattern matchingRelating to patterns and pattern matchingD-newcomer-roadblockDiagnostics: Confusing error or lint; hard to understand for new users.Diagnostics: Confusing error or lint; hard to understand for new users.D-papercutDiagnostics: An error or lint that needs small tweaks.Diagnostics: An error or lint that needs small tweaks.E-mentorCall for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.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.