expandable 0.1.1

What if we could check declarative macros before using them?
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#[allow(unused)]
#[expandable::expr]
#[rustfmt::skip]
macro_rules! test {
    ($e:expr, $p:pat) => {
        match $e {
            // TODO(scrabsha): add tests for match arms that don't end with `,`.
            $p => $e,
            () => {},
            () if a != $e => {},
            _ => 42,
            _ | _ => 31,
        }
    };
}

fn main() {}