about summary refs log tree commit diff
path: root/src/libsyntax
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2014-02-25 05:26:36 -0800
committerbors <bors@rust-lang.org>2014-02-25 05:26:36 -0800
commitd222f03f42fe855d2fadc87010453bcfc2a669e1 (patch)
tree0e7dfbf0d0577a97d5c00822eb5c913693ea4f10 /src/libsyntax
parent27cc309a7f1cc89c35388eda48041d9880b4737c (diff)
parent3e531ed0edd44c5af714fdeaa0cddb9d5c8154a2 (diff)
downloadrust-d222f03f42fe855d2fadc87010453bcfc2a669e1.tar.gz
rust-d222f03f42fe855d2fadc87010453bcfc2a669e1.zip
auto merge of #12525 : eddyb/rust/gate-default-type-param-usage, r=alexcrichton
Also reverted `#[deriving(Hash)]` to implement `Hash` only for `SipState`, until we decide what to do about default type params.
Diffstat (limited to 'src/libsyntax')
-rw-r--r--src/libsyntax/ext/deriving/hash.rs20
1 files changed, 4 insertions, 16 deletions
diff --git a/src/libsyntax/ext/deriving/hash.rs b/src/libsyntax/ext/deriving/hash.rs
index 0b9158547ed..acae4f9efa6 100644
--- a/src/libsyntax/ext/deriving/hash.rs
+++ b/src/libsyntax/ext/deriving/hash.rs
@@ -13,7 +13,6 @@ use codemap::Span;
 use ext::base::ExtCtxt;
 use ext::build::AstBuilder;
 use ext::deriving::generic::*;
-use parse::token::InternedString;
 
 pub fn expand_deriving_hash(cx: &mut ExtCtxt,
                             span: Span,
@@ -21,29 +20,18 @@ pub fn expand_deriving_hash(cx: &mut ExtCtxt,
                             item: @Item,
                             push: |@Item|) {
 
-    let allow_default_type_param_usage = cx.attribute(
-        span,
-        cx.meta_list(
-            span,
-            InternedString::new("allow"),
-            ~[cx.meta_word(span, InternedString::new("default_type_param_usage"))]));
-
     let hash_trait_def = TraitDef {
         span: span,
-        attributes: ~[allow_default_type_param_usage],
-        path: Path::new_(~["std", "hash", "Hash"], None,
-                         ~[~Literal(Path::new_local("__H"))], true),
+        attributes: ~[],
+        path: Path::new(~["std", "hash", "Hash"]),
         additional_bounds: ~[],
-        generics: LifetimeBounds {
-            lifetimes: ~[],
-            bounds: ~[("__H", ~[Path::new(~["std", "io", "Writer"])])],
-        },
+        generics: LifetimeBounds::empty(),
         methods: ~[
             MethodDef {
                 name: "hash",
                 generics: LifetimeBounds::empty(),
                 explicit_self: borrowed_explicit_self(),
-                args: ~[Ptr(~Literal(Path::new_local("__H")),
+                args: ~[Ptr(~Literal(Path::new(~["std", "hash", "sip", "SipState"])),
                             Borrowed(None, MutMutable))],
                 ret_ty: nil_ty(),
                 inline: true,