summary refs log tree commit diff
path: root/src/libsyntax/ext
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2014-02-22 22:01:54 -0800
committerbors <bors@rust-lang.org>2014-02-22 22:01:54 -0800
commitedf351e9f7d17777b1385093bfa7b6654e662d44 (patch)
treeb7bd97d19061101273e5a3e4f81624e11a7c16fc /src/libsyntax/ext
parent9b9e2f80d56e2e91a164d917b6a75699cd40cab5 (diff)
parent760733280521739bad5bd826235839498fdb8367 (diff)
downloadrust-edf351e9f7d17777b1385093bfa7b6654e662d44.tar.gz
rust-edf351e9f7d17777b1385093bfa7b6654e662d44.zip
auto merge of #12451 : edwardw/rust/ident-2-name, r=cmr
Closes #7743.
Diffstat (limited to 'src/libsyntax/ext')
-rw-r--r--src/libsyntax/ext/build.rs4
-rw-r--r--src/libsyntax/ext/deriving/ty.rs8
-rw-r--r--src/libsyntax/ext/format.rs4
3 files changed, 8 insertions, 8 deletions
diff --git a/src/libsyntax/ext/build.rs b/src/libsyntax/ext/build.rs
index 7ac324e5092..33cdf4d9add 100644
--- a/src/libsyntax/ext/build.rs
+++ b/src/libsyntax/ext/build.rs
@@ -73,7 +73,7 @@ pub trait AstBuilder {
 
     fn trait_ref(&self, path: ast::Path) -> ast::TraitRef;
     fn typarambound(&self, path: ast::Path) -> ast::TyParamBound;
-    fn lifetime(&self, span: Span, ident: ast::Ident) -> ast::Lifetime;
+    fn lifetime(&self, span: Span, ident: ast::Name) -> ast::Lifetime;
 
     // statements
     fn stmt_expr(&self, expr: @ast::Expr) -> @ast::Stmt;
@@ -411,7 +411,7 @@ impl<'a> AstBuilder for ExtCtxt<'a> {
         ast::TraitTyParamBound(self.trait_ref(path))
     }
 
-    fn lifetime(&self, span: Span, ident: ast::Ident) -> ast::Lifetime {
+    fn lifetime(&self, span: Span, ident: ast::Name) -> ast::Lifetime {
         ast::Lifetime { id: ast::DUMMY_NODE_ID, span: span, ident: ident }
     }
 
diff --git a/src/libsyntax/ext/deriving/ty.rs b/src/libsyntax/ext/deriving/ty.rs
index ff0fd388ebe..1d3dd9185ca 100644
--- a/src/libsyntax/ext/deriving/ty.rs
+++ b/src/libsyntax/ext/deriving/ty.rs
@@ -111,14 +111,14 @@ pub fn nil_ty() -> Ty<'static> {
 
 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).name)),
         None => None
     }
 }
 
 fn mk_lifetimes(cx: &ExtCtxt, span: Span, lt: &Option<&str>) -> OptVec<ast::Lifetime> {
     match *lt {
-        Some(ref s) => opt_vec::with(cx.lifetime(span, cx.ident_of(*s))),
+        Some(ref s) => opt_vec::with(cx.lifetime(span, cx.ident_of(*s).name)),
         None => opt_vec::Empty
     }
 }
@@ -221,7 +221,7 @@ impl<'a> LifetimeBounds<'a> {
                        self_generics: &Generics)
                        -> Generics {
         let lifetimes = self.lifetimes.map(|lt| {
-            cx.lifetime(span, cx.ident_of(*lt))
+            cx.lifetime(span, cx.ident_of(*lt).name)
         });
         let ty_params = self.bounds.map(|t| {
             match t {
@@ -248,7 +248,7 @@ pub fn get_explicit_self(cx: &ExtCtxt, span: Span, self_ptr: &Option<PtrTy>)
                 match *ptr {
                     Send => ast::SelfUniq,
                     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).name));
                         ast::SelfRegion(lt, mutbl)
                     }
                 });
diff --git a/src/libsyntax/ext/format.rs b/src/libsyntax/ext/format.rs
index d7a2647c34d..16a12661e9d 100644
--- a/src/libsyntax/ext/format.rs
+++ b/src/libsyntax/ext/format.rs
@@ -497,7 +497,7 @@ impl<'a> Context<'a> {
                         ])
             }
         };
-        let life = self.ecx.lifetime(sp, self.ecx.ident_of("static"));
+        let life = self.ecx.lifetime(sp, self.ecx.ident_of("static").name);
         let ty = self.ecx.ty_path(self.ecx.path_all(
                 sp,
                 true,
@@ -629,7 +629,7 @@ impl<'a> Context<'a> {
                     self.ecx.ident_of("Piece"),
                 ],
                 opt_vec::with(
-                    self.ecx.lifetime(self.fmtsp, self.ecx.ident_of("static"))),
+                    self.ecx.lifetime(self.fmtsp, self.ecx.ident_of("static").name)),
                 ~[]
             ), None);
         let ty = ast::TyFixedLengthVec(