diff options
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 d9b2b5f4802..70ab222b484 100644 --- a/compiler/rustc_expand/src/errors.rs +++ b/compiler/rustc_expand/src/errors.rs @@ -375,3 +375,18 @@ pub struct TraceMacro { #[primary_span] pub span: Span, } + +#[derive(Diagnostic)] +#[diag(expand_proc_macro_panicked)] +pub(crate) struct ProcMacroPanicked { + #[primary_span] + pub span: Span, + #[subdiagnostic] + pub message: Option<ProcMacroPanickedHelp>, +} + +#[derive(Subdiagnostic)] +#[help(expand_help)] +pub(crate) struct ProcMacroPanickedHelp { + pub message: String, +} |
