about summary refs log tree commit diff
path: root/src/libsyntax
diff options
context:
space:
mode:
authorMichael Darakananda <pongad@gmail.com>2014-03-05 01:19:14 -0500
committerMichael Darakananda <pongad@gmail.com>2014-03-08 15:09:00 -0500
commit438893b36fe241b37eb76250f7c38ac8832f5706 (patch)
tree3cf612ba7c19fcc473a7f4e11ac984224a5c885d /src/libsyntax
parent96e8c00e95b1980c429c5cfa4aae33e3cc60f3c5 (diff)
downloadrust-438893b36fe241b37eb76250f7c38ac8832f5706.tar.gz
rust-438893b36fe241b37eb76250f7c38ac8832f5706.zip
Removed DeepClone. Issue #12698.
Diffstat (limited to 'src/libsyntax')
-rw-r--r--src/libsyntax/ext/deriving/clone.rs30
-rw-r--r--src/libsyntax/ext/deriving/mod.rs1
2 files changed, 0 insertions, 31 deletions
diff --git a/src/libsyntax/ext/deriving/clone.rs b/src/libsyntax/ext/deriving/clone.rs
index feda1694ff1..e63363c608b 100644
--- a/src/libsyntax/ext/deriving/clone.rs
+++ b/src/libsyntax/ext/deriving/clone.rs
@@ -44,36 +44,6 @@ pub fn expand_deriving_clone(cx: &mut ExtCtxt,
     trait_def.expand(cx, mitem, item, push)
 }
 
-pub fn expand_deriving_deep_clone(cx: &mut ExtCtxt,
-                                  span: Span,
-                                  mitem: @MetaItem,
-                                  item: @Item,
-                                  push: |@Item|) {
-    let trait_def = TraitDef {
-        span: span,
-        attributes: Vec::new(),
-        path: Path::new(vec!("std", "clone", "DeepClone")),
-        additional_bounds: Vec::new(),
-        generics: LifetimeBounds::empty(),
-        methods: vec!(
-            MethodDef {
-                name: "deep_clone",
-                generics: LifetimeBounds::empty(),
-                explicit_self: borrowed_explicit_self(),
-                args: Vec::new(),
-                ret_ty: Self,
-                inline: true,
-                const_nonmatching: false,
-                // cs_clone uses the ident passed to it, i.e. it will
-                // call deep_clone (not clone) here.
-                combine_substructure: |c, s, sub| cs_clone("DeepClone", c, s, sub)
-            }
-        )
-    };
-
-    trait_def.expand(cx, mitem, item, push)
-}
-
 fn cs_clone(
     name: &str,
     cx: &mut ExtCtxt, trait_span: Span,
diff --git a/src/libsyntax/ext/deriving/mod.rs b/src/libsyntax/ext/deriving/mod.rs
index 28f039f0818..890cc75bb95 100644
--- a/src/libsyntax/ext/deriving/mod.rs
+++ b/src/libsyntax/ext/deriving/mod.rs
@@ -70,7 +70,6 @@ pub fn expand_meta_deriving(cx: &mut ExtCtxt,
                                                                    |i| push(i))));
                         match tname.get() {
                             "Clone" => expand!(clone::expand_deriving_clone),
-                            "DeepClone" => expand!(clone::expand_deriving_deep_clone),
 
                             "Hash" => expand!(hash::expand_deriving_hash),