about summary refs log tree commit diff
path: root/src/libsyntax
diff options
context:
space:
mode:
authorPatrick Walton <pcwalton@mimiga.net>2013-03-14 11:22:51 -0700
committerPatrick Walton <pcwalton@mimiga.net>2013-03-18 11:45:59 -0700
commit299995c2b62c520708d450e4b7c6d360be0fd852 (patch)
tree3d2fecdcc467d3dafc74fc627a4784838ec2d0a7 /src/libsyntax
parentf54adca7c984c75334d9cb73ec85bf3b5c326ed9 (diff)
downloadrust-299995c2b62c520708d450e4b7c6d360be0fd852.tar.gz
rust-299995c2b62c520708d450e4b7c6d360be0fd852.zip
librustc: Convert all uses of old lifetime notation to new lifetime notation. rs=delifetiming
Diffstat (limited to 'src/libsyntax')
-rw-r--r--src/libsyntax/ext/base.rs4
-rw-r--r--src/libsyntax/ext/deriving.rs4
-rw-r--r--src/libsyntax/ext/quote.rs6
-rw-r--r--src/libsyntax/opt_vec.rs2
-rw-r--r--src/libsyntax/parse/parser.rs2
5 files changed, 12 insertions, 6 deletions
diff --git a/src/libsyntax/ext/base.rs b/src/libsyntax/ext/base.rs
index f0822ea4d25..652bc541a1f 100644
--- a/src/libsyntax/ext/base.rs
+++ b/src/libsyntax/ext/base.rs
@@ -421,7 +421,7 @@ pub fn get_exprs_from_tts(cx: @ext_ctxt, tts: &[ast::token_tree])
 // use a top-level managed pointer by some difficulties
 // with pushing and popping functionally, and the ownership
 // issues.  As a result, the values returned by the table
-// also need to be managed; the &self/... type that Maps
+// also need to be managed; the &'self ... type that Maps
 // return won't work for things that need to get outside
 // of that managed pointer.  The easiest way to do this
 // is just to insist that the values in the tables are
@@ -454,7 +454,7 @@ impl <K: Eq + Hash + IterBytes ,V: Copy> MapChain<K,V>{
 
     // ugh: can't get this to compile with mut because of the
     // lack of flow sensitivity.
-    fn get_map(&self) -> &self/LinearMap<K,@V> {
+    fn get_map(&self) -> &'self LinearMap<K,@V> {
         match *self {
             BaseMapChain (~ref map) => map,
             ConsMapChain (~ref map,_) => map
diff --git a/src/libsyntax/ext/deriving.rs b/src/libsyntax/ext/deriving.rs
index 26b5b4566b7..54b123bff2f 100644
--- a/src/libsyntax/ext/deriving.rs
+++ b/src/libsyntax/ext/deriving.rs
@@ -45,12 +45,12 @@ pub impl Junction {
     }
 }
 
-type ExpandDerivingStructDefFn = &self/fn(@ext_ctxt,
+type ExpandDerivingStructDefFn = &'self fn(@ext_ctxt,
                                           span,
                                           x: &struct_def,
                                           ident,
                                           y: &Generics) -> @item;
-type ExpandDerivingEnumDefFn = &self/fn(@ext_ctxt,
+type ExpandDerivingEnumDefFn = &'self fn(@ext_ctxt,
                                         span,
                                         x: &enum_def,
                                         ident,
diff --git a/src/libsyntax/ext/quote.rs b/src/libsyntax/ext/quote.rs
index 6deffbe0ae1..2cf52c47959 100644
--- a/src/libsyntax/ext/quote.rs
+++ b/src/libsyntax/ext/quote.rs
@@ -392,6 +392,12 @@ fn mk_token(cx: @ext_ctxt, sp: span, tok: token::Token) -> @ast::expr {
                                     build::mk_lit(cx, sp, ast::lit_bool(b))]);
         }
 
+        LIFETIME(ident) => {
+            return build::mk_call(cx, sp,
+                                  ids_ext(cx, ~[~"LIFETIME"]),
+                                  ~[mk_ident(cx, sp, ident)]);
+        }
+
         DOC_COMMENT(ident) => {
             return build::mk_call(cx, sp,
                                   ids_ext(cx, ~[~"DOC_COMMENT"]),
diff --git a/src/libsyntax/opt_vec.rs b/src/libsyntax/opt_vec.rs
index ba0c7a71b7c..dbabca55a11 100644
--- a/src/libsyntax/opt_vec.rs
+++ b/src/libsyntax/opt_vec.rs
@@ -61,7 +61,7 @@ impl<T> OptVec<T> {
         }
     }
 
-    pure fn get(&self, i: uint) -> &self/T {
+    pure fn get(&self, i: uint) -> &'self T {
         match *self {
             Empty => fail!(fmt!("Invalid index %u", i)),
             Vec(ref v) => &v[i]
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs
index a30b910b347..7b7d246c324 100644
--- a/src/libsyntax/parse/parser.rs
+++ b/src/libsyntax/parse/parser.rs
@@ -708,7 +708,7 @@ pub impl Parser {
     }
 
     fn parse_borrowed_pointee(&self) -> ty_ {
-        // look for `&'lt` or `&foo/` and interpret `foo` as the region name:
+        // look for `&'lt` or `&'foo ` and interpret `foo` as the region name:
         let opt_lifetime = self.parse_opt_lifetime();
 
         if self.token_is_closure_keyword(&copy *self.token) {