Skip to content

Tuple struct patterns can match unit structs #28692

Closed
@petrochenkov

Description

@petrochenkov

This compiles on stable and nightly, but it shouldn't:

struct S;

fn main() {
    let S(..) = S;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    T-langRelevant to the language 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