diff options
| author | Erick Tryzelaar <erick.tryzelaar@gmail.com> | 2013-01-15 16:05:20 -0800 |
|---|---|---|
| committer | Tim Chevalier <chevalier@alum.wellesley.edu> | 2013-01-20 14:08:18 -0800 |
| commit | d5d77b9351bdcb7a9fd7c6a27950990d33eea232 (patch) | |
| tree | d5d51cb523cbdd41ce069d1c4478437bf1cfff5b /src/libsyntax/ext/auto_encode.rs | |
| parent | 5ba7e55a4c42f6a53eccb60d4098b9422dd6e345 (diff) | |
| download | rust-d5d77b9351bdcb7a9fd7c6a27950990d33eea232.tar.gz rust-d5d77b9351bdcb7a9fd7c6a27950990d33eea232.zip | |
convert the remaining ast record types into structs
These are: region,arg,fn_decl,method,_mod,foreign_mod, variant_arg,enum_def_,variant_,trait_ref.
Diffstat (limited to 'src/libsyntax/ext/auto_encode.rs')
| -rw-r--r-- | src/libsyntax/ext/auto_encode.rs | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/libsyntax/ext/auto_encode.rs b/src/libsyntax/ext/auto_encode.rs index aa577591804..9578a2f6317 100644 --- a/src/libsyntax/ext/auto_encode.rs +++ b/src/libsyntax/ext/auto_encode.rs @@ -462,7 +462,7 @@ fn mk_impl( } ); - let opt_trait = Some(@{ + let opt_trait = Some(@ast::trait_ref { path: path, ref_id: cx.next_id(), }); @@ -581,7 +581,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, }, @@ -593,7 +593,7 @@ fn mk_ser_method( span: span, }; - let ser_inputs = ~[{ + let ser_inputs = ~[ast::arg { mode: ast::infer(cx.next_id()), ty: ty_s, pat: @ast::pat { @@ -613,13 +613,13 @@ fn mk_ser_method( span: span, }; - let ser_decl = { + let ser_decl = ast::fn_decl { inputs: ser_inputs, output: ser_output, cf: ast::return_val, }; - @{ + @ast::method { ident: cx.ident_of(~"encode"), attrs: ~[], tps: ~[], @@ -644,7 +644,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, }, @@ -656,7 +656,7 @@ fn mk_deser_method( span: span, }; - let deser_inputs = ~[{ + let deser_inputs = ~[ast::arg { mode: ast::infer(cx.next_id()), ty: ty_d, pat: @ast::pat { @@ -670,13 +670,13 @@ fn mk_deser_method( id: cx.next_id(), }]; - let deser_decl = { + let deser_decl = ast::fn_decl { inputs: deser_inputs, output: ty, cf: ast::return_val, }; - @{ + @ast::method { ident: cx.ident_of(~"decode"), attrs: ~[], tps: ~[], @@ -1187,8 +1187,8 @@ fn mk_enum_deser_body( let expr_lambda = cx.expr( span, ast::expr_fn_block( - { - inputs: ~[{ + ast::fn_decl { + inputs: ~[ast::arg { mode: ast::infer(cx.next_id()), ty: @ast::Ty { id: cx.next_id(), |
