diff options
Diffstat (limited to 'compiler/rustc_expand/src/errors.rs')
| -rw-r--r-- | compiler/rustc_expand/src/errors.rs | 30 | 
1 files changed, 30 insertions, 0 deletions
| diff --git a/compiler/rustc_expand/src/errors.rs b/compiler/rustc_expand/src/errors.rs index 929f3479466..fe901603c73 100644 --- a/compiler/rustc_expand/src/errors.rs +++ b/compiler/rustc_expand/src/errors.rs @@ -393,6 +393,36 @@ 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] + 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] | 
