summary refs log tree commit diff
path: root/src/libsyntax/ext
diff options
context:
space:
mode:
authorJorge Aparicio <japaricious@gmail.com>2015-01-28 12:43:16 -0500
committerJorge Aparicio <japaricious@gmail.com>2015-01-29 07:49:02 -0500
commita6f9180fd61f509ebc6d666eda3f6bb42dd02573 (patch)
tree5e848819ef6992b8f7f79ebc2275cea6caef57ef /src/libsyntax/ext
parent4b75931ce24f2c7ccf6486e434c24c6df595f4bc (diff)
downloadrust-a6f9180fd61f509ebc6d666eda3f6bb42dd02573.tar.gz
rust-a6f9180fd61f509ebc6d666eda3f6bb42dd02573.zip
bring back `#[derive(Show)]` with a deprecation warning
Diffstat (limited to 'src/libsyntax/ext')
-rw-r--r--src/libsyntax/ext/deriving/mod.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/libsyntax/ext/deriving/mod.rs b/src/libsyntax/ext/deriving/mod.rs
index 2b7a44c1727..d3d7fee3a18 100644
--- a/src/libsyntax/ext/deriving/mod.rs
+++ b/src/libsyntax/ext/deriving/mod.rs
@@ -107,6 +107,14 @@ pub fn expand_meta_derive(cx: &mut ExtCtxt,
 
                             "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),