diff options
| author | Tshepang Mbambo <tshepang@gmail.com> | 2024-02-19 06:02:14 +0200 |
|---|---|---|
| committer | Tshepang Mbambo <tshepang@gmail.com> | 2024-02-19 09:23:26 +0200 |
| commit | 61509914a3debdf6ff809c35af15cc5cabcc32a0 (patch) | |
| tree | d699c7bb7e605840ba73592c3b83f85376b88e9a /compiler/rustc_expand/src/errors.rs | |
| parent | 23a3d777c8a95715977608c827de63e7738fa228 (diff) | |
| download | rust-61509914a3debdf6ff809c35af15cc5cabcc32a0.tar.gz rust-61509914a3debdf6ff809c35af15cc5cabcc32a0.zip | |
make "custom attribute 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 2584ff62e98..5bbf4411bc3 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_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 { #[primary_span] |
