From f51771939ba5b36ec89b9f0b51c2cbda51164676 Mon Sep 17 00:00:00 2001 From: Sean McArthur Date: Wed, 7 Jun 2017 17:06:55 -0700 Subject: [PATCH] core: allow messages in unimplemented!() macro --- src/libcore/macros.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/libcore/macros.rs b/src/libcore/macros.rs index bf4e414d416..320d3236840 100644 --- a/src/libcore/macros.rs +++ b/src/libcore/macros.rs @@ -542,7 +542,8 @@ macro_rules! unreachable { #[macro_export] #[stable(feature = "rust1", since = "1.0.0")] macro_rules! unimplemented { - () => (panic!("not yet implemented")) + () => (panic!("not yet implemented")); + ($($arg:tt)+) => (panic!("not yet implemented: {}", format_args!($($arg)*))); } /// Built-in macros to the compiler itself.