Skip to content

Allow disjunctive patterns in irrefutable let-bindings. (RFC) #2956

Closed
@bblum

Description

@bblum
enum foo {
    a(bool,int),
    b(int)
}
fn foo_to_int(-foo: foo) -> int {
    let a(_,x) | b(x) <- foo;
    x
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-frontendArea: Compiler frontend (errors, parsing and HIR)A-grammarArea: The grammar of Rust

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions