Reformat struct_span_code_err!.

This commit is contained in:
Nicholas Nethercote 2024-01-13 10:31:09 +11:00
parent d78329b92e
commit 2de99ec787

View File

@ -437,11 +437,7 @@ impl<G: EmissionGuarantee> Drop for DiagnosticBuilder<'_, G> {
#[macro_export] #[macro_export]
macro_rules! struct_span_code_err { macro_rules! struct_span_code_err {
($dcx:expr, $span:expr, $code:ident, $($message:tt)*) => ({ ($dcx:expr, $span:expr, $code:ident, $($message:tt)*) => ({
$dcx.struct_span_err( $dcx.struct_span_err($span, format!($($message)*)).with_code($crate::error_code!($code))
$span,
format!($($message)*),
)
.with_code($crate::error_code!($code))
}) })
} }