diff options
| author | Niko Matsakis <niko@alum.mit.edu> | 2013-02-27 19:41:02 -0500 |
|---|---|---|
| committer | Niko Matsakis <niko@alum.mit.edu> | 2013-03-09 19:43:59 -0500 |
| commit | 7cbd4b20ee857cf383ef1c0d8b34727a433231a9 (patch) | |
| tree | 519693f796860294ff1953ff468b5a5c4aa7d462 /src/libsyntax/ext | |
| parent | 98ce99d500b13c79fd8e74e807167d8a59caf0e7 (diff) | |
| download | rust-7cbd4b20ee857cf383ef1c0d8b34727a433231a9.tar.gz rust-7cbd4b20ee857cf383ef1c0d8b34727a433231a9.zip | |
Remove @ast::Region and replace with @ast::Lifetime.
Modify pretty-printer to emit lifetimes and fix a few minor parser bugs that this uncovered.
Diffstat (limited to 'src/libsyntax/ext')
| -rw-r--r-- | src/libsyntax/ext/auto_encode.rs | 10 | ||||
| -rw-r--r-- | src/libsyntax/ext/deriving.rs | 5 |
2 files changed, 4 insertions, 11 deletions
diff --git a/src/libsyntax/ext/auto_encode.rs b/src/libsyntax/ext/auto_encode.rs index 644afaff37c..ecb5be6cc3c 100644 --- a/src/libsyntax/ext/auto_encode.rs +++ b/src/libsyntax/ext/auto_encode.rs @@ -594,10 +594,7 @@ fn mk_ser_method( let ty_s = @ast::Ty { id: cx.next_id(), node: ast::ty_rptr( - @ast::region { - id: cx.next_id(), - node: ast::re_anon, - }, + None, ast::mt { ty: cx.ty_path(span, ~[cx.ident_of(~"__S")], ~[]), mutbl: ast::m_imm @@ -658,10 +655,7 @@ fn mk_deser_method( let ty_d = @ast::Ty { id: cx.next_id(), node: ast::ty_rptr( - @ast::region { - id: cx.next_id(), - node: ast::re_anon, - }, + None, ast::mt { ty: cx.ty_path(span, ~[cx.ident_of(~"__D")], ~[]), mutbl: ast::m_imm diff --git a/src/libsyntax/ext/deriving.rs b/src/libsyntax/ext/deriving.rs index a1514bc3eab..efea962a089 100644 --- a/src/libsyntax/ext/deriving.rs +++ b/src/libsyntax/ext/deriving.rs @@ -19,7 +19,7 @@ use ast::{enum_variant_kind, expr, expr_match, ident, impure_fn, item, item_}; use ast::{item_enum, item_impl, item_struct, Generics}; use ast::{m_imm, meta_item, method}; use ast::{named_field, or, pat, pat_ident, pat_wild, public, pure_fn}; -use ast::{re_anon, stmt, struct_def, struct_variant_kind}; +use ast::{stmt, struct_def, struct_variant_kind}; use ast::{sty_by_ref, sty_region, tuple_variant_kind, ty_nil, TyParam}; use ast::{TyParamBound, ty_path, ty_rptr, unnamed_field, variant}; use ext::base::ext_ctxt; @@ -147,9 +147,8 @@ fn create_eq_method(cx: ext_ctxt, span, type_ident, generics); - let arg_region = @ast::region { id: cx.next_id(), node: re_anon }; let arg_type = ty_rptr( - arg_region, + None, ast::mt { ty: arg_path_type, mutbl: m_imm } ); let arg_type = @ast::Ty { |
