dtolnay / quote

Rust quasi-quoting
Apache License 2.0
1.32k stars 90 forks source link

Interpolate arbitrary Iterator multiple times #229

Open lukaslihotzki opened 2 years ago

lukaslihotzki commented 2 years ago

Interpolation does support arbitrary Iterators, but they only can be used once. The types that can be used multiple times seem to be hardcoded in src/runtime.rs ([T], Vec<T>, BTreeSet<T>). References and RepInterp do not seem useful for this case because Iterators usually aren't Copy.

Possible fixes: