Closed thomasyonug closed 6 months ago
$channel::<usize>()
is not a valid expression as $channel
is parsed as expression due to the $channel:expr
match. Try matching it using $($channel:tt)*
and then use $($channel)*::<usize>()
.
This doesn't happen with proc macros as the syn::Expr
gets turned back into a bunch of token trees rather than being captured as an expression like happens in the decl macro (macro by example) case.
I tried this code:
I expected to see this happen:
Instead, this happened:
Meta
rustc --version --verbose
:Backtrace
```
```