Skip to content

Rustc misunderstands when an @ is missing in a pattern and the error message is confusing #88404

Closed
@Lokathor

Description

@Lokathor

playground

I should have typed rest @ .., and to fix my problem I need to add the @ between rest and ..

Instead rustc tries to tell me three different ways that "rest.." is wrong, none of which are "hey did you forget the @ sign?"

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-diagnosticsArea: Messages for errors, warnings, and lintsA-patternsRelating to patterns and pattern matchingA-slice-patternsArea: Slice patterns, https://github.com/rust-lang/rust/issues/23121A-suggestion-diagnosticsArea: Suggestions generated by the compiler applied by `cargo fix`C-enhancementCategory: An issue proposing an enhancement or a PR with one.D-confusingDiagnostics: Confusing error or lint that should be reworked.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions