improve error message when #[naked] is used with #[inline]
This commit is contained in:
@@ -79,13 +79,6 @@ pub struct AttrShouldBeAppliedToFn {
|
||||
pub on_crate: bool,
|
||||
}
|
||||
|
||||
#[derive(Diagnostic)]
|
||||
#[diag(passes_naked_tracked_caller, code = E0736)]
|
||||
pub struct NakedTrackedCaller {
|
||||
#[primary_span]
|
||||
pub attr_span: Span,
|
||||
}
|
||||
|
||||
#[derive(Diagnostic)]
|
||||
#[diag(passes_should_be_applied_to_fn, code = E0739)]
|
||||
pub struct TrackedCallerWrongLocation {
|
||||
@@ -1124,13 +1117,6 @@ pub struct UnlabeledCfInWhileCondition<'a> {
|
||||
pub cf_type: &'a str,
|
||||
}
|
||||
|
||||
#[derive(Diagnostic)]
|
||||
#[diag(passes_cannot_inline_naked_function)]
|
||||
pub struct CannotInlineNakedFunction {
|
||||
#[primary_span]
|
||||
pub span: Span,
|
||||
}
|
||||
|
||||
#[derive(LintDiagnostic)]
|
||||
#[diag(passes_undefined_naked_function_abi)]
|
||||
pub struct UndefinedNakedFunctionAbi;
|
||||
@@ -1196,6 +1182,16 @@ pub struct NakedFunctionsMustUseNoreturn {
|
||||
pub last_span: Span,
|
||||
}
|
||||
|
||||
#[derive(Diagnostic)]
|
||||
#[diag(passes_naked_functions_codegen_attribute, code = E0736)]
|
||||
pub struct NakedFunctionCodegenAttribute {
|
||||
#[primary_span]
|
||||
#[label]
|
||||
pub span: Span,
|
||||
#[label(passes_label2)]
|
||||
pub naked_span: Span,
|
||||
}
|
||||
|
||||
#[derive(Diagnostic)]
|
||||
#[diag(passes_attr_only_in_functions)]
|
||||
pub struct AttrOnlyInFunctions {
|
||||
|
||||
Reference in New Issue
Block a user