Port #[link_ordinal] to the new attribute parsing infrastructure.

This commit is contained in:
Anne Stijns
2025-06-29 23:39:09 +02:00
parent bfc046a4b8
commit 75561c446a
20 changed files with 159 additions and 150 deletions

View File

@@ -514,6 +514,15 @@ pub(crate) struct NakedFunctionIncompatibleAttribute {
pub attr: String,
}
#[derive(Diagnostic)]
#[diag(attr_parsing_link_ordinal_out_of_range)]
#[note]
pub(crate) struct LinkOrdinalOutOfRange {
#[primary_span]
pub span: Span,
pub ordinal: u128,
}
pub(crate) enum AttributeParseErrorReason {
ExpectedNoArgs,
ExpectedStringLiteral { byte_string: Option<Span> },