about summary refs log tree commit diff
path: root/src/libsyntax/ext
diff options
context:
space:
mode:
authorJames Miller <bladeon@gmail.com>2013-07-06 00:33:52 +1200
committerJames Miller <bladeon@gmail.com>2013-07-07 22:51:09 +1200
commit62c83bb17be9a47799d702a9470aa7a84012c782 (patch)
treee3abca4816806c45787d44c209b144fa068b58b8 /src/libsyntax/ext
parentcd1b6c897911c91167c5a3c5e3c2fa0d9334ad45 (diff)
De-manage Lifetime
Diffstat (limited to 'src/libsyntax/ext')
-rw-r--r--src/libsyntax/ext/build.rs8
-rw-r--r--src/libsyntax/ext/deriving/generic.rs2
-rw-r--r--src/libsyntax/ext/deriving/ty.rs9
3 files changed, 9 insertions, 10 deletions
diff --git a/src/libsyntax/ext/build.rs b/src/libsyntax/ext/build.rs
index c933caa16c4..14ecc26a1c2 100644
--- a/src/libsyntax/ext/build.rs
+++ b/src/libsyntax/ext/build.rs
@@ -38,7 +38,7 @@ pub trait AstBuilder {
     fn path_all(&self, sp: span,
                 global: bool,
                 idents: ~[ast::ident],
-                rp: Option<@ast::Lifetime>,
+                rp: Option<ast::Lifetime>,
                 types: ~[@ast::Ty])
         -> ast::Path;
 
@@ -51,7 +51,7 @@ pub trait AstBuilder {
 
     fn ty_rptr(&self, span: span,
                ty: @ast::Ty,
-               lifetime: Option<@ast::Lifetime>,
+               lifetime: Option<ast::Lifetime>,
                mutbl: ast::mutability)
         -> @ast::Ty;
     fn ty_uniq(&self, span: span, ty: @ast::Ty) -> @ast::Ty;
@@ -238,7 +238,7 @@ impl AstBuilder for @ExtCtxt {
     fn path_all(&self, sp: span,
                 global: bool,
                 idents: ~[ast::ident],
-                rp: Option<@ast::Lifetime>,
+                rp: Option<ast::Lifetime>,
                 types: ~[@ast::Ty])
         -> ast::Path {
         ast::Path {
@@ -281,7 +281,7 @@ impl AstBuilder for @ExtCtxt {
     fn ty_rptr(&self,
                span: span,
                ty: @ast::Ty,
-               lifetime: Option<@ast::Lifetime>,
+               lifetime: Option<ast::Lifetime>,
                mutbl: ast::mutability)
         -> @ast::Ty {
         self.ty(span,
diff --git a/src/libsyntax/ext/deriving/generic.rs b/src/libsyntax/ext/deriving/generic.rs
index e397a416304..8bd74b96afc 100644
--- a/src/libsyntax/ext/deriving/generic.rs
+++ b/src/libsyntax/ext/deriving/generic.rs
@@ -351,7 +351,7 @@ impl<'self> TraitDef<'self> {
         let self_lifetime = if generics.lifetimes.is_empty() {
             None
         } else {
-            Some(@*generics.lifetimes.get(0))
+            Some(*generics.lifetimes.get(0))
         };
 
         // Create the type of `self`.
diff --git a/src/libsyntax/ext/deriving/ty.rs b/src/libsyntax/ext/deriving/ty.rs
index 4dee2e2cdb8..2a60a20b872 100644
--- a/src/libsyntax/ext/deriving/ty.rs
+++ b/src/libsyntax/ext/deriving/ty.rs
@@ -110,9 +110,9 @@ pub fn nil_ty() -> Ty<'static> {
     Tuple(~[])
 }
 
-fn mk_lifetime(cx: @ExtCtxt, span: span, lt: &Option<&str>) -> Option<@ast::Lifetime> {
+fn mk_lifetime(cx: @ExtCtxt, span: span, lt: &Option<&str>) -> Option<ast::Lifetime> {
     match *lt {
-        Some(ref s) => Some(@cx.lifetime(span, cx.ident_of(*s))),
+        Some(ref s) => Some(cx.lifetime(span, cx.ident_of(*s))),
         None => None
     }
 }
@@ -171,7 +171,7 @@ impl<'self> Ty<'self> {
                 let lifetime = if self_generics.lifetimes.is_empty() {
                     None
                 } else {
-                    Some(@*self_generics.lifetimes.get(0))
+                    Some(*self_generics.lifetimes.get(0))
                 };
 
                 cx.path_all(span, false, ~[self_ty], lifetime,
@@ -251,8 +251,7 @@ pub fn get_explicit_self(cx: @ExtCtxt, span: span, self_ptr: &Option<PtrTy>)
                     Send => ast::sty_uniq,
                     Managed(mutbl) => ast::sty_box(mutbl),
                     Borrowed(ref lt, mutbl) => {
-                        let lt = lt.map(|s| @cx.lifetime(span,
-                                                         cx.ident_of(*s)));
+                        let lt = lt.map(|s| cx.lifetime(span, cx.ident_of(*s)));
                         ast::sty_region(lt, mutbl)
                     }
                 });