Closed thomwiggers closed 2 years ago
I think this is not related to the use
keyword, but rather attempt to glue tokens with special characters, like :
.
In my case, I can't glue Enum class name and it's enumerator
enum States{
Unknowm,
On,
Off
}
let x = paste!{ [<States:: Off>] ; }
error: expected identifier after :
Surprised BTW - the ## operator in C/C++ is so simple and obvious :/
In @thomwiggers snippet use macroname!{...}
is not valid Rust syntax. You'd want to write:
paste! {
use [<te st>]::X;
}
I'm trying to construct an identifier of a namespace from parts, but that does not seem to be supported.
results in
https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=5cb2fb8f9b67684f1a271dd51fedffc7