Skip to content

the pattern 'x()' should not be a legal identifier pattern #5947

Closed
@jbclements

Description

@jbclements

It should not be possible to use x() as a match pattern, like this:

fn main() {
    let z = match 3 {
        x() => x
    };
    assert_eq!(z,3);
}

I have a fix for this, I'm just adding it to get an issue number.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions