dtolnay / reflect

Compile-time reflection API for developing robust procedural macros (proof of concept)

Home Page:https://docs.rs/reflect

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Emit a match-expression for Destructure nodes

dtolnay opened this issue · comments

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 } => {
        /* ... */
    }
}