From b2d30b72bfaa1f36808151e5825073cdff2e7ea7 Mon Sep 17 00:00:00 2001 From: Eduard Burtescu Date: Fri, 7 Feb 2014 00:38:33 +0200 Subject: Removed @self and @Trait. --- src/libsyntax/ext/deriving/encodable.rs | 4 ++-- src/libsyntax/ext/deriving/ty.rs | 5 ----- 2 files changed, 2 insertions(+), 7 deletions(-) (limited to 'src/libsyntax/ext/deriving') diff --git a/src/libsyntax/ext/deriving/encodable.rs b/src/libsyntax/ext/deriving/encodable.rs index 66b744ecbcb..a44e4af5b6b 100644 --- a/src/libsyntax/ext/deriving/encodable.rs +++ b/src/libsyntax/ext/deriving/encodable.rs @@ -75,7 +75,7 @@ would yield functions like: } */ -use ast::{MetaItem, Item, Expr, MutImmutable, MutMutable}; +use ast::{MetaItem, Item, Expr, MutMutable}; use codemap::Span; use ext::base::ExtCtxt; use ext::build::AstBuilder; @@ -100,7 +100,7 @@ pub fn expand_deriving_encodable(cx: &ExtCtxt, MethodDef { name: "encode", generics: LifetimeBounds::empty(), - explicit_self: Some(Some(Borrowed(None, MutImmutable))), + explicit_self: borrowed_explicit_self(), args: ~[Ptr(~Literal(Path::new_local("__E")), Borrowed(None, MutMutable))], ret_ty: nil_ty(), diff --git a/src/libsyntax/ext/deriving/ty.rs b/src/libsyntax/ext/deriving/ty.rs index 893a1c68426..f37abbe1ef4 100644 --- a/src/libsyntax/ext/deriving/ty.rs +++ b/src/libsyntax/ext/deriving/ty.rs @@ -24,7 +24,6 @@ use opt_vec::OptVec; /// The types of pointers pub enum PtrTy<'a> { Send, // ~ - Managed, // @ Borrowed(Option<&'a str>, ast::Mutability), // &['lifetime] [mut] } @@ -138,9 +137,6 @@ impl<'a> Ty<'a> { Send => { cx.ty_uniq(span, raw_ty) } - Managed => { - cx.ty_box(span, raw_ty) - } Borrowed(ref lt, mutbl) => { let lt = mk_lifetime(cx, span, lt); cx.ty_rptr(span, raw_ty, lt, mutbl) @@ -251,7 +247,6 @@ pub fn get_explicit_self(cx: &ExtCtxt, span: Span, self_ptr: &Option) span, match *ptr { Send => ast::SelfUniq, - Managed => ast::SelfBox, Borrowed(ref lt, mutbl) => { let lt = lt.map(|s| cx.lifetime(span, cx.ident_of(s))); ast::SelfRegion(lt, mutbl) -- cgit 1.4.1-3-g733a5