mirror of
https://gitee.com/openharmony/third_party_rust_proc-macro2
synced 2024-11-27 01:20:48 +00:00
doc_comment: consume vector instead of iterating and collecting it
This commit is contained in:
parent
9f100ba092
commit
12f9352c4b
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user