-
-
Notifications
You must be signed in to change notification settings - Fork 15k
Rustc misunderstands when an @ is missing in a pattern and the error message is confusing #88404
Copy link
Copy link
Closed
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsA-patternsRelating to patterns and pattern matchingRelating to patterns and pattern matchingA-slice-patternsArea: Slice patterns, https://github.com/rust-lang/rust/issues/23121Area: Slice patterns, https://github.com/rust-lang/rust/issues/23121A-suggestion-diagnosticsArea: Suggestions generated by the compiler applied by `cargo fix`Area: Suggestions generated by the compiler applied by `cargo fix`C-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.D-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 lintsA-patternsRelating to patterns and pattern matchingRelating to patterns and pattern matchingA-slice-patternsArea: Slice patterns, https://github.com/rust-lang/rust/issues/23121Area: Slice patterns, https://github.com/rust-lang/rust/issues/23121A-suggestion-diagnosticsArea: Suggestions generated by the compiler applied by `cargo fix`Area: Suggestions generated by the compiler applied by `cargo fix`C-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.D-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.
playground
I should have typed
rest @ .., and to fix my problem I need to add the@betweenrestand..Instead rustc tries to tell me three different ways that "rest.." is wrong, none of which are "hey did you forget the @ sign?"