On Fri, Mar 28, 2014 at 9:30 AM, Jared Forsyth <[email protected]> wrote: > Is rust's macro system powerful enough to do calculations, such that you > would be able to guarantee that the provided patterns were exhaustive? > From what I've seen, the macro system can mostly just do syntax expansion - > not logic, etc.
I haven't had occasion to work with the macro system at all, but it looks like you're correct now that I've reviewed the docs further. Reimplementing exhaustiveness checking in custom code is an ugly idea to me in itself. It looks like the requirement here is actually that the compiler must allow us to represent arbitrary-width integers. With that, we get exhaustiveness checking on bitfields for "free", and the only question is bikeshedding exactly how a user may go about extracting a bitfield. _______________________________________________ Rust-dev mailing list [email protected] https://mail.mozilla.org/listinfo/rust-dev
