]> git.lizzy.rs Git - rust.git/commitdiff
core: allow messages in unimplemented!() macro
authorSean McArthur <sean.monstar@gmail.com>
Thu, 8 Jun 2017 00:06:55 +0000 (17:06 -0700)
committerSean McArthur <sean.monstar@gmail.com>
Thu, 8 Jun 2017 00:06:55 +0000 (17:06 -0700)
src/libcore/macros.rs

index bf4e414d416849318ef9f73949fdafe626104768..320d3236840148b65bac9b86b27ed2fb95f77376 100644 (file)
@@ -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.