Skip to content

Commit a6f9180

Browse files
author
Jorge Aparicio
committed
bring back #[derive(Show)] with a deprecation warning
1 parent 4b75931 commit a6f9180

File tree

1 file changed

+8
-0
lines changed
  • src/libsyntax/ext/deriving

1 file changed

+8
-0
lines changed

src/libsyntax/ext/deriving/mod.rs

+8
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,14 @@ pub fn expand_meta_derive(cx: &mut ExtCtxt,
107107

108108
"Rand" => expand!(rand::expand_deriving_rand),
109109

110+
"Show" => {
111+
cx.span_warn(titem.span,
112+
"derive(Show) is deprecated \
113+
in favor of derive(Debug)");
114+
115+
expand!(show::expand_deriving_show)
116+
},
117+
110118
"Debug" => expand!(show::expand_deriving_show),
111119

112120
"Default" => expand!(default::expand_deriving_default),

0 commit comments

Comments
 (0)