Skip to content

Improve diagnostics for an invalid binding in a tuple struct pattern #74641

Closed
@JohnTitor

Description

@JohnTitor

This PR can be merged as is, but I think we could also add another branch that detects the case with PatKind::Ident(..) where .. is present and record it with a PartialRes::new(Res::Err), which should eliminate the second unnecessary error that complains about x not being defined. (Haven't looked at this deeply enough to be sure.)

Originally posted by @estebank in #74557 (comment)

Follow-up of #74557

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-diagnosticsArea: Messages for errors, warnings, and lintsC-enhancementCategory: An issue proposing an enhancement or a PR with one.P-lowLow priorityT-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