improve error messages for C-cmse-nonsecure-entry functions

This commit is contained in:
Folkert de Vries 2024-10-14 22:32:32 +02:00
parent 9322d183f4
commit 10aa255541
14 changed files with 612 additions and 108 deletions

View file

@ -1627,23 +1627,25 @@ pub(crate) struct InvalidReceiverTy<'tcx> {
pub(crate) struct EffectsWithoutNextSolver;
#[derive(Diagnostic)]
#[diag(hir_analysis_cmse_call_inputs_stack_spill, code = E0798)]
#[diag(hir_analysis_cmse_inputs_stack_spill, code = E0798)]
#[note]
pub(crate) struct CmseCallInputsStackSpill {
pub(crate) struct CmseInputsStackSpill {
#[primary_span]
#[label]
pub span: Span,
pub plural: bool,
pub abi_name: &'static str,
}
#[derive(Diagnostic)]
#[diag(hir_analysis_cmse_call_output_stack_spill, code = E0798)]
#[diag(hir_analysis_cmse_output_stack_spill, code = E0798)]
#[note(hir_analysis_note1)]
#[note(hir_analysis_note2)]
pub(crate) struct CmseCallOutputStackSpill {
pub(crate) struct CmseOutputStackSpill {
#[primary_span]
#[label]
pub span: Span,
pub abi_name: &'static str,
}
#[derive(Diagnostic)]
@ -1659,3 +1661,10 @@ pub(crate) struct BadReturnTypeNotation {
#[primary_span]
pub span: Span,
}
#[derive(Diagnostic)]
#[diag(hir_analysis_cmse_entry_generic, code = E0798)]
pub(crate) struct CmseEntryGeneric {
#[primary_span]
pub span: Span,
}