Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Emit a match-expression for Destructure nodes #8

Open
dtolnay opened this issue May 27, 2018 · 0 comments
Open

Emit a match-expression for Destructure nodes #8

dtolnay opened this issue May 27, 2018 · 0 comments

Comments

@dtolnay
Copy link
Owner

dtolnay commented May 27, 2018

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 } => {
        /* ... */
    }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant