diff --git a/src/libsyntax/ext/deriving/mod.rs b/src/libsyntax/ext/deriving/mod.rs index fccef47d1ea2c..5fb320b913626 100644 --- a/src/libsyntax/ext/deriving/mod.rs +++ b/src/libsyntax/ext/deriving/mod.rs @@ -70,8 +70,28 @@ pub fn expand_meta_deriving(cx: &mut ExtCtxt, "Hash" => expand!(hash::expand_deriving_hash), - "Encodable" => expand!(encodable::expand_deriving_encodable), - "Decodable" => expand!(decodable::expand_deriving_decodable), + "RustcEncodable" => { + expand!(encodable::expand_deriving_encodable) + } + "RustcDecodable" => { + expand!(decodable::expand_deriving_decodable) + } + "Encodable" => { + // NOTE: uncomment after a stage0 snap + // cx.span_warn(titem.span, + // "deriving(Encodable) is deprecated \ + // in favor of deriving(RustcEncodable)"); + + expand!(encodable::expand_deriving_encodable) + } + "Decodable" => + // NOTE: uncomment after a stage0 snap + // cx.span_warn(titem.span, + // "deriving(Decodable) is deprecated \ + // in favor of deriving(RustcDecodable)"); + + expand!(decodable::expand_deriving_decodable) + } "PartialEq" => expand!(eq::expand_deriving_eq), "Eq" => expand!(totaleq::expand_deriving_totaleq),