From cb5f9799421c7ae9289295acdf15546a1e68da91 Mon Sep 17 00:00:00 2001 From: gamazeps Date: Wed, 29 Oct 2014 00:59:36 +0100 Subject: Diagnostic: resolve bare fn in expected closure Closes #15273 (I did not find how to get the identifier in the message :/) Also creates the span_help! macro associated with #18126 --- src/libsyntax/diagnostics/macros.rs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/libsyntax') diff --git a/src/libsyntax/diagnostics/macros.rs b/src/libsyntax/diagnostics/macros.rs index c344168b62a..b4bf793d4e1 100644 --- a/src/libsyntax/diagnostics/macros.rs +++ b/src/libsyntax/diagnostics/macros.rs @@ -39,6 +39,13 @@ macro_rules! span_note( }) ) +#[macro_export] +macro_rules! span_help( + ($session:expr, $span:expr, $($message:tt)*) => ({ + ($session).span_help($span, format!($($message)*).as_slice()) + }) +) + #[macro_export] macro_rules! register_diagnostics( ($($code:tt),*) => ( -- cgit 1.4.1-3-g733a5