]>
Commit | Line | Data |
---|---|---|
353b0b11 FG |
1 | // run-pass |
2 | ||
3 | macro_rules! stringify_item { | |
4 | ($item:item) => { | |
5 | stringify!($item) | |
6 | }; | |
7 | } | |
8 | ||
9 | macro_rules! repro { | |
10 | ($expr:expr) => { | |
11 | stringify_item! { | |
12 | pub fn repro() -> bool { | |
13 | $expr | |
14 | } | |
15 | } | |
16 | }; | |
17 | } | |
18 | ||
19 | fn main() { | |
20 | assert_eq!( | |
21 | repro!(match () { () => true } | true), | |
22 | "pub fn repro() -> bool { (match () { () => true, }) | true }" | |
23 | ); | |
24 | } |