I believe that storing patterns as run-time values would pose some
serious challenges and wouldn't fit well with the rest of Rust.

But having macros expand into pattern arms is desirable.

Another workaround you might consider is having a macro that expands
into the whole match expression, supplying the one special arm, and
accepting patterns and blocks as arguments to turn into the other
arms.


Paul
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to