]> git.lizzy.rs Git - rust.git/commitdiff
bring back `#[derive(Show)]` with a deprecation warning
authorJorge Aparicio <japaricious@gmail.com>
Wed, 28 Jan 2015 17:43:16 +0000 (12:43 -0500)
committerJorge Aparicio <japaricious@gmail.com>
Thu, 29 Jan 2015 12:49:02 +0000 (07:49 -0500)
src/libsyntax/ext/deriving/mod.rs

index 2b7a44c172792a3c1de688d0bd3346863ea21bce..d3d7fee3a189a19a578835ce1712b5b888c8d600 100644 (file)
@@ -107,6 +107,14 @@ macro_rules! expand {
 
                             "Rand" => expand!(rand::expand_deriving_rand),
 
+                            "Show" => {
+                                cx.span_warn(titem.span,
+                                             "derive(Show) is deprecated \
+                                              in favor of derive(Debug)");
+
+                                expand!(show::expand_deriving_show)
+                            },
+
                             "Debug" => expand!(show::expand_deriving_show),
 
                             "Default" => expand!(default::expand_deriving_default),