blob: b489efe9ce939c76744104940e2c9b31086d7db6 [file] [log] [blame]
//@ run-pass
macro_rules! stringify_item {
($item:item) => {
stringify!($item)
};
}
macro_rules! repro {
($expr:expr) => {
stringify_item! {
pub fn repro() -> bool {
$expr
}
}
};
}
fn main() {
assert_eq!(
repro!(match () { () => true } | true),
"pub fn repro() -> bool { (match () { () => true, }) | true }"
);
}