move naked checks out of check_attr.rs

This commit is contained in:
Jana Dönszelmann
2025-06-13 02:28:33 +02:00
parent 73bcf4c117
commit 5c0a625205
16 changed files with 211 additions and 194 deletions

View File

@@ -482,6 +482,17 @@ pub(crate) struct UnrecognizedReprHint {
pub span: Span,
}
#[derive(Diagnostic)]
#[diag(attr_parsing_naked_functions_incompatible_attribute, code = E0736)]
pub(crate) struct NakedFunctionIncompatibleAttribute {
#[primary_span]
#[label]
pub span: Span,
#[label(attr_parsing_naked_attribute)]
pub naked_span: Span,
pub attr: String,
}
pub(crate) enum AttributeParseErrorReason {
ExpectedNoArgs,
ExpectedStringLiteral { byte_string: Option<Span> },