I am trying to write a macro where the input syntax is $a:ident <- $b:expr (unrelated to the old placement expression syntax). Rustfmt sees this as placement, decides to format the macro input as a placement expression, and hits an unimplemented!().
macro_rules! demo {
($a:ident <- $b:expr) => {};
}
fn main() {
demo!(i <- 0);
}
thread 'main' panicked at 'not yet implemented', tools/rustfmt/src/expr.rs:347:47
note: Run with `RUST_BACKTRACE=1` for a backtrace.
If we don't want to implement formatting for actual placement expressions (#2743), at least inside of macro input rustfmt should let them go and not treat them as expressions at all.
I am trying to write a macro where the input syntax is
$a:ident <- $b:expr(unrelated to the old placement expression syntax). Rustfmt sees this as placement, decides to format the macro input as a placement expression, and hits anunimplemented!().If we don't want to implement formatting for actual placement expressions (#2743), at least inside of macro input rustfmt should let them go and not treat them as expressions at all.