Skip to content

Foo(..) patterns work for tuple structs, but (..) doesn't work for tuples #31443

Description

@niconii

Right now, this compiles:

struct Foo(i32, i32, i32);

fn main() {
    match Foo(1, 2, 3) {
        Foo(..) => { }
    }
}

but this fails to compile:

fn main() {
    match (1, 2, 3) {
        // must write `(_, _, _) => { }`
        (..) => { }
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    T-langRelevant to the language team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions