Port #[link_section] to the new attribute parsing infrastructure

This commit is contained in:
Anne Stijns
2025-06-29 15:37:54 +02:00
parent 5ca574e85b
commit 54cec0cf5a
14 changed files with 101 additions and 26 deletions

View File

@@ -256,6 +256,9 @@ pub enum AttributeKind {
/// Represents `#[link_name]`.
LinkName { name: Symbol, span: Span },
/// Represents [`#[link_section]`](https://doc.rust-lang.org/reference/abi.html#the-link_section-attribute)
LinkSection { name: Symbol, span: Span },
/// Represents `#[loop_match]`.
LoopMatch(Span),

View File

@@ -24,6 +24,7 @@ impl AttributeKind {
DocComment { .. } => Yes,
ExportName { .. } => Yes,
Inline(..) => No,
LinkSection { .. } => No,
MacroTransparency(..) => Yes,
Repr(..) => No,
Stability { .. } => Yes,