Port #[ignore] to the new attribute parsing infrastructure

Signed-off-by: Jonathan Brouwer <jonathantbrouwer@gmail.com>
This commit is contained in:
Jonathan Brouwer
2025-06-30 16:09:01 +02:00
parent 733b47ea4b
commit 2d8ffff10a
13 changed files with 117 additions and 40 deletions

View File

@@ -250,6 +250,13 @@ pub enum AttributeKind {
span: Span,
},
/// Represents `#[ignore]`
Ignore {
span: Span,
/// ignore can optionally have a reason: `#[ignore = "reason this is ignored"]`
reason: Option<Symbol>,
},
/// Represents `#[inline]` and `#[rustc_force_inline]`.
Inline(InlineAttr, Span),

View File

@@ -26,6 +26,7 @@ impl AttributeKind {
Deprecation { .. } => Yes,
DocComment { .. } => Yes,
ExportName { .. } => Yes,
Ignore { .. } => No,
Inline(..) => No,
LinkName { .. } => Yes,
LinkSection { .. } => No,