diff options
| -rw-r--r-- | compiler/rustc_ast/src/attr/mod.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/rustc_ast/src/attr/mod.rs b/compiler/rustc_ast/src/attr/mod.rs index db008ea139d..7b7078fabbb 100644 --- a/compiler/rustc_ast/src/attr/mod.rs +++ b/compiler/rustc_ast/src/attr/mod.rs @@ -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, + ), } } } |
