I was fiddling around with macros when I noticed that they don't work in a pattern position (such as on the LHS of => in a match). Just for curiosity's sake, I was wondering whether there was a particular reason for this, or if it just hadn't been implemented / wasn't worth implementing. The motivating case was creating intuitive constructors for a `struct List<T>(Option<~(T, List<T>)>);` while maintaining compatibility with `Option`, since `List(Some(~(v, next))` doesn't read quite as well as `Cons!(v, next)`.
_______________________________________________ Rust-dev mailing list [email protected] https://mail.mozilla.org/listinfo/rust-dev
