diff options
| author | Eduard Burtescu <edy.burt@gmail.com> | 2014-02-24 22:45:31 +0200 |
|---|---|---|
| committer | Eduard Burtescu <edy.burt@gmail.com> | 2014-02-24 22:45:31 +0200 |
| commit | 3e531ed0edd44c5af714fdeaa0cddb9d5c8154a2 (patch) | |
| tree | d894b94122f7c297cbba7cca5fc31bd5da557789 /src/libsyntax | |
| parent | 672097753a217d4990129cbdfab16ef8c9b08b21 (diff) | |
| download | rust-3e531ed0edd44c5af714fdeaa0cddb9d5c8154a2.tar.gz rust-3e531ed0edd44c5af714fdeaa0cddb9d5c8154a2.zip | |
Gate default type parameter overrides.
Fixes #12423.
Diffstat (limited to 'src/libsyntax')
| -rw-r--r-- | src/libsyntax/ext/deriving/hash.rs | 20 |
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, |
