Skip to content

Commit 33aff5b

Browse files
committed
Use TokenStream::token_alone in one place.
1 parent bb9c2f5 commit 33aff5b

File tree

1 file changed

+4
-4
lines changed
  • compiler/rustc_ast/src/attr

1 file changed

+4
-4
lines changed

compiler/rustc_ast/src/attr/mod.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -197,10 +197,10 @@ impl Attribute {
197197
.unwrap_or_else(|| panic!("attribute is missing tokens: {self:?}"))
198198
.to_attr_token_stream()
199199
.to_tokenstream(),
200-
&AttrKind::DocComment(comment_kind, data) => TokenStream::new(vec![TokenTree::Token(
201-
Token::new(token::DocComment(comment_kind, self.style, data), self.span),
202-
Spacing::Alone,
203-
)]),
200+
&AttrKind::DocComment(comment_kind, data) => TokenStream::token_alone(
201+
token::DocComment(comment_kind, self.style, data),
202+
self.span,
203+
),
204204
}
205205
}
206206
}

0 commit comments

Comments
 (0)