diff --git a/src/libsyntax/ext/quote.rs b/src/libsyntax/ext/quote.rs index eb1f25143cf..21c5626d16d 100644 --- a/src/libsyntax/ext/quote.rs +++ b/src/libsyntax/ext/quote.rs @@ -54,9 +54,10 @@ pub mod rt { } } - impl ToTokens for Vec { - fn to_tokens(&self, _cx: &ExtCtxt) -> Vec { - (*self).clone() + impl ToTokens for Vec { + fn to_tokens(&self, cx: &ExtCtxt) -> Vec { + let a = self.iter().flat_map(|t| t.to_tokens(cx).move_iter()); + FromIterator::from_iter(a) } }