1
Fork 0

make "custom attribute panicked" translatable

This commit is contained in:
Tshepang Mbambo 2024-02-19 06:02:14 +02:00
parent 23a3d777c8
commit 61509914a3
3 changed files with 25 additions and 5 deletions

View file

@ -392,6 +392,21 @@ pub(crate) struct ProcMacroPanickedHelp {
pub message: String,
}
#[derive(Diagnostic)]
#[diag(expand_custom_attribute_panicked)]
pub(crate) struct CustomAttributePanicked {
#[primary_span]
pub span: Span,
#[subdiagnostic]
pub message: Option<CustomAttributePanickedHelp>,
}
#[derive(Subdiagnostic)]
#[help(expand_help)]
pub(crate) struct CustomAttributePanickedHelp {
pub message: String,
}
#[derive(Diagnostic)]
#[diag(expand_proc_macro_derive_tokens)]
pub struct ProcMacroDeriveTokens {