Closed
Description
The lines of code here: quote.rs#L226 are sub-optimal and also require hacks like the one described on #15962 to actually work correctly.
Effectively, the current code is implementing to_tokens
by going through the transformation sequence:
AST -> string -> token-trees
The methods should instead be emitting token-trees directly from the AST, avoiding the serialization to and de-serialization from the intermediate string.