宏不扩展内插令牌树吗?

use*_*ser 5 rust

为什么这样:

macro_rules! a_macro {
    ($($a:tt)+) => ($($a)+);
}   

fn main() {
    let x:u32 = 1;
    let y:u32 = a_macro!(-x);
}
Run Code Online (Sandbox Code Playgroud)

无法编译

<anon>:2:23: 2:25 error: unexpected token: `an interpolated tt`
<anon>:2     ($($a:tt)+) => ($($a)+);
                               ^~
playpen: application terminated with error code 101
Run Code Online (Sandbox Code Playgroud)

blu*_*uss 5

原因是:它尚未实施.这是一个已知的限制(从Rust 1.0开始).tt宏的参数很有用,但在使用时必须始终转发到宏.