doc_comment: consume vector instead of iterating and collecting it

This commit is contained in:
klensy 2021-12-10 19:53:50 +03:00
parent 9f100ba092
commit 12f9352c4b

View File

@ -819,7 +819,7 @@ fn doc_comment(input: Cursor) -> PResult<Vec<TokenTree>> {
for tt in &mut stream {
tt.set_span(span);
}
let group = Group::new(Delimiter::Bracket, stream.into_iter().collect());
let group = Group::new(Delimiter::Bracket, TokenStream { inner: stream });
trees.push(crate::Group::_new_stable(group).into());
for tt in &mut trees {
tt.set_span(span);