I have tried to use stmt instead, but I got another problem, the semicolon.
macro_rules! test {
($($e:stmt);*;) => {$($e)*};
}
fn ok() {
test! {
let a = 1;
let b = 2;
Vec::<u8>::new();
}
}
Actually each stmt ignores the semicolon, it is a problem if there is a line that actually return something, and you don't add let _ = in the beginning.
Is there any way to work out this?