diff options
| author | Tshepang Mbambo <tshepang@gmail.com> | 2024-02-20 08:31:13 +0200 | 
|---|---|---|
| committer | Tshepang Mbambo <tshepang@gmail.com> | 2024-02-20 08:31:13 +0200 | 
| commit | f68682fd484fc219192aa7ccf7bb1d809288df5e (patch) | |
| tree | 0a245df5a2586678a547de3e2ee23dd1a0eb480e /compiler/rustc_expand/src/errors.rs | |
| parent | 61509914a3debdf6ff809c35af15cc5cabcc32a0 (diff) | |
| download | rust-f68682fd484fc219192aa7ccf7bb1d809288df5e.tar.gz rust-f68682fd484fc219192aa7ccf7bb1d809288df5e.zip  | |
make "proc-macro derive panicked" translatable
Diffstat (limited to 'compiler/rustc_expand/src/errors.rs')
| -rw-r--r-- | compiler/rustc_expand/src/errors.rs | 15 | 
1 files changed, 15 insertions, 0 deletions
diff --git a/compiler/rustc_expand/src/errors.rs b/compiler/rustc_expand/src/errors.rs index 5bbf4411bc3..299ba8a1fdf 100644 --- a/compiler/rustc_expand/src/errors.rs +++ b/compiler/rustc_expand/src/errors.rs @@ -393,6 +393,21 @@ pub(crate) struct ProcMacroPanickedHelp { } #[derive(Diagnostic)] +#[diag(expand_proc_macro_derive_panicked)] +pub(crate) struct ProcMacroDerivePanicked { + #[primary_span] + pub span: Span, + #[subdiagnostic] + pub message: Option<ProcMacroDerivePanickedHelp>, +} + +#[derive(Subdiagnostic)] +#[help(expand_help)] +pub(crate) struct ProcMacroDerivePanickedHelp { + pub message: String, +} + +#[derive(Diagnostic)] #[diag(expand_custom_attribute_panicked)] pub(crate) struct CustomAttributePanicked { #[primary_span]  | 
