Module blog::daily_rfcs::attributes::_0003_attribute_usage
source · [−]Expand description
libsyntax/ast.rs
pub struct Attribute {
pub id: AttrId,
pub style: AttrStyle,
pub path: Path,
pub tokens: TokenStream,
pub is_sugared_doc: bool,
pub span: Span,
}
Note
syntax::ast::parse::ParseSess
useAttrId
to generate a side table of used attributes ONLY during parsing and expanding.- The
attribute-usage
lint would run at the end of compilation and warn on all attributes whose ID does not appear in the side table.