1
Fork 0

Use TokenStream::token_alone in one place.

This commit is contained in:
Nicholas Nethercote 2023-10-11 17:16:04 +11:00
parent bb9c2f50c3
commit 33aff5b152

View file

@ -197,10 +197,10 @@ impl Attribute {
.unwrap_or_else(|| panic!("attribute is missing tokens: {self:?}"))
.to_attr_token_stream()
.to_tokenstream(),
&AttrKind::DocComment(comment_kind, data) => TokenStream::new(vec![TokenTree::Token(
Token::new(token::DocComment(comment_kind, self.style, data), self.span),
Spacing::Alone,
)]),
&AttrKind::DocComment(comment_kind, data) => TokenStream::token_alone(
token::DocComment(comment_kind, self.style, data),
self.span,
),
}
}
}