From a6f9180fd61f509ebc6d666eda3f6bb42dd02573 Mon Sep 17 00:00:00 2001 From: Jorge Aparicio Date: Wed, 28 Jan 2015 12:43:16 -0500 Subject: bring back `#[derive(Show)]` with a deprecation warning --- src/libsyntax/ext/deriving/mod.rs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/libsyntax/ext') 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), -- cgit 1.4.1-3-g733a5