Closed
Description
Keep them as tokens in AST, this may partially mitigate the perf impact from turning normal comments into doc comments (#60930).
pub struct Attribute {
pub id: AttrId,
pub style: AttrStyle,
pub path: Path,
pub tokens: TokenStream,
pub is_sugared_doc: bool,
pub span: Span,
}
=>
pub struct Attribute {
pub kind: AttrKind,
pub span: Span,
pub id: AttrId,
}
pub enum AttrKind {
Normal(Path, TokenStream, AttrStyle),
Doc(Symbol),
}