Skip to content

Emit a match-expression for Destructure nodes #8

@dtolnay

Description

@dtolnay

This part of the current generated code would be better expressed as a match, which would be able to work equally well against enums later.

let __v3 = &__v0.x;
let __v4 = &__v0.y;
/* ... */
match __v0 {
    Point { x: __v3, y: __v4 } => {
        /* ... */
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions