diff options
Diffstat (limited to 'compiler/rustc_macros/src/diagnostics/error.rs')
| -rw-r--r-- | compiler/rustc_macros/src/diagnostics/error.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_macros/src/diagnostics/error.rs b/compiler/rustc_macros/src/diagnostics/error.rs index 9cdb9fbab12..a78cf2b63d0 100644 --- a/compiler/rustc_macros/src/diagnostics/error.rs +++ b/compiler/rustc_macros/src/diagnostics/error.rs @@ -56,7 +56,7 @@ fn path_to_string(path: &syn::Path) -> String { /// Returns an error diagnostic on span `span` with msg `msg`. #[must_use] pub(crate) fn span_err<T: Into<String>>(span: impl MultiSpan, msg: T) -> Diagnostic { - Diagnostic::spanned(span, Level::Error, msg) + Diagnostic::spanned(span, Level::Error, format!("derive(Diagnostic): {}", msg.into())) } /// Emit a diagnostic on span `$span` with msg `$msg` (optionally performing additional decoration |
