From 017df987b8f7877f5be04bc137ea830a9c82343e Mon Sep 17 00:00:00 2001 From: Lenny222 <github@kudling.de> Date: Wed, 15 May 2013 10:51:40 +0200 Subject: [PATCH] remove deriving_eq, deriving_iter_bytes, deriving_clone (deprecated in 0.6) --- src/libsyntax/ext/base.rs | 9 --------- src/libsyntax/ext/deriving/clone.rs | 9 --------- src/libsyntax/ext/deriving/cmp/eq.rs | 8 -------- src/libsyntax/ext/deriving/iter_bytes.rs | 10 ---------- src/test/compile-fail/deriving-obsolete.rs | 17 ----------------- 5 files changed, 53 deletions(-) delete mode 100644 src/test/compile-fail/deriving-obsolete.rs diff --git a/src/libsyntax/ext/base.rs b/src/libsyntax/ext/base.rs index 20bf01c0dc1..907ec7211e7 100644 --- a/src/libsyntax/ext/base.rs +++ b/src/libsyntax/ext/base.rs @@ -148,15 +148,6 @@ pub fn syntax_expander_table() -> SyntaxEnv { syntax_expanders.insert(@~"deriving", @SE(ItemDecorator( ext::deriving::expand_meta_deriving))); - syntax_expanders.insert(@~"deriving_eq", - @SE(ItemDecorator( - ext::deriving::eq::expand_deriving_obsolete))); - syntax_expanders.insert(@~"deriving_iter_bytes", - @SE(ItemDecorator( - ext::deriving::iter_bytes::expand_deriving_obsolete))); - syntax_expanders.insert(@~"deriving_clone", - @SE(ItemDecorator( - ext::deriving::clone::expand_deriving_obsolete))); // Quasi-quoting expanders syntax_expanders.insert(@~"quote_tokens", diff --git a/src/libsyntax/ext/deriving/clone.rs b/src/libsyntax/ext/deriving/clone.rs index 2151e9529c4..8637777393a 100644 --- a/src/libsyntax/ext/deriving/clone.rs +++ b/src/libsyntax/ext/deriving/clone.rs @@ -42,15 +42,6 @@ pub fn expand_deriving_clone(cx: @ext_ctxt, &trait_def) } -pub fn expand_deriving_obsolete(cx: @ext_ctxt, - span: span, - _mitem: @meta_item, - in_items: ~[@item]) - -> ~[@item] { - cx.span_err(span, ~"`#[deriving_clone]` is obsolete; use `#[deriving(Clone)]` instead"); - in_items -} - fn cs_clone(cx: @ext_ctxt, span: span, substr: &Substructure) -> @expr { let clone_ident = substr.method_ident; diff --git a/src/libsyntax/ext/deriving/cmp/eq.rs b/src/libsyntax/ext/deriving/cmp/eq.rs index e431e1f78bf..a34e090a01b 100644 --- a/src/libsyntax/ext/deriving/cmp/eq.rs +++ b/src/libsyntax/ext/deriving/cmp/eq.rs @@ -56,11 +56,3 @@ pub fn expand_deriving_eq(cx: @ext_ctxt, expand_deriving_generic(cx, span, mitem, in_items, &trait_def) } - -pub fn expand_deriving_obsolete(cx: @ext_ctxt, - span: span, - _mitem: @meta_item, - in_items: ~[@item]) -> ~[@item] { - cx.span_err(span, ~"`#[deriving_eq]` is obsolete; use `#[deriving(Eq)]` instead"); - in_items -} diff --git a/src/libsyntax/ext/deriving/iter_bytes.rs b/src/libsyntax/ext/deriving/iter_bytes.rs index 9eb246ffe22..dbd4aa65f30 100644 --- a/src/libsyntax/ext/deriving/iter_bytes.rs +++ b/src/libsyntax/ext/deriving/iter_bytes.rs @@ -41,16 +41,6 @@ pub fn expand_deriving_iter_bytes(cx: @ext_ctxt, expand_deriving_generic(cx, span, mitem, in_items, &trait_def) } -pub fn expand_deriving_obsolete(cx: @ext_ctxt, - span: span, - _mitem: @meta_item, - in_items: ~[@item]) - -> ~[@item] { - cx.span_err(span, ~"`#[deriving_iter_bytes]` is obsolete; use `#[deriving(IterBytes)]` \ - instead"); - in_items -} - fn iter_bytes_substructure(cx: @ext_ctxt, span: span, substr: &Substructure) -> @expr { let lsb0_f = match substr.nonself_args { [l, f] => ~[l, f], diff --git a/src/test/compile-fail/deriving-obsolete.rs b/src/test/compile-fail/deriving-obsolete.rs deleted file mode 100644 index 298dced1e21..00000000000 --- a/src/test/compile-fail/deriving-obsolete.rs +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright 2013 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or -// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license -// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -#[deriving_clone] //~ ERROR `#[deriving_clone]` is obsolete; use `#[deriving(Clone)]` instead -#[deriving_eq] //~ ERROR `#[deriving_eq]` is obsolete; use `#[deriving(Eq)]` instead -#[deriving_iter_bytes] -//~^ ERROR `#[deriving_iter_bytes]` is obsolete; use `#[deriving(IterBytes)]` instead -struct Foo; - -pub fn main() { }