Closed Pistonight closed 4 months ago
Per https://github.com/dtolnay/quote/pull/276#pullrequestreview-2105173018, I would prefer not to support this. Thanks anyway!
Ah, I tried to search for discussions on this in issues and didn't find any. I wonder if it would be worth to include a note that this will not be supported in the doc comment?
Currently there is support for interpolating iterators but it often requires constructing the iterator in one place and using it in another
For example, deriving something from the enum variants:
For large macros, it creates a lot of temporaries to be used later. Also personally, I found it easier to build and work with TokenStreams directly rather than levels of iterators in
quote
it would be nice if we could build match_arms inline in the
quote
, something likeor have it support a block that returns an iterator
If you have alternative approach I am happy to discuss as well. I haven't looked into the implementation details, just thinking about this from the user's perspective. Not sure how easy/hard this would be to implement but I am happy to look into that as well if you think this is worth pursuing