about summary refs log tree commit diff
path: root/src/libsyntax/ext/deriving
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/deriving
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/deriving')
-rw-r--r--src/libsyntax/ext/deriving/ty.rs8
1 files changed, 4 insertions, 4 deletions
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)
                     }
                 });