struct A {
x: i64,
}
macro_rules! foo {
($T:ty) => {
fn test() -> $T {
$T { x: 3 }
}
}
}
foo!(A);
error: expected expression, found `A`
8 | $T { x: 3 }
I know I can use ident, but I don't get why I cannot use $T {}.