diff options
| author | Patrick Walton <pcwalton@mimiga.net> | 2013-04-24 01:29:46 -0700 |
|---|---|---|
| committer | Patrick Walton <pcwalton@mimiga.net> | 2013-04-29 14:30:55 -0700 |
| commit | f30f54e9d062bdb5b3cb10dd7185470280c1c278 (patch) | |
| tree | b641e10eb9ee445b023d9d9b69ea8330c41ca30b /src/libsyntax/ext | |
| parent | a12a3db5b44d539f5512376a2e7bb40fbab63683 (diff) | |
| download | rust-f30f54e9d062bdb5b3cb10dd7185470280c1c278.tar.gz rust-f30f54e9d062bdb5b3cb10dd7185470280c1c278.zip | |
librustc: Remove the concept of modes from the compiler.
This commit does not remove `ty::arg`, although that should be possible to do now.
Diffstat (limited to 'src/libsyntax/ext')
| -rw-r--r-- | src/libsyntax/ext/auto_encode.rs | 30 | ||||
| -rw-r--r-- | src/libsyntax/ext/build.rs | 1 | ||||
| -rw-r--r-- | src/libsyntax/ext/pipes/ast_builder.rs | 1 |
3 files changed, 15 insertions, 17 deletions
diff --git a/src/libsyntax/ext/auto_encode.rs b/src/libsyntax/ext/auto_encode.rs index 0d451c66edb..da7b9570131 100644 --- a/src/libsyntax/ext/auto_encode.rs +++ b/src/libsyntax/ext/auto_encode.rs @@ -608,7 +608,6 @@ fn mk_ser_method( }; let ser_inputs = ~[ast::arg { - mode: ast::infer(cx.next_id()), is_mutbl: false, ty: ty_s, pat: @ast::pat { @@ -670,20 +669,22 @@ fn mk_deser_method( span: span, }; - let deser_inputs = ~[ast::arg { - mode: ast::infer(cx.next_id()), - is_mutbl: false, - ty: ty_d, - pat: @ast::pat { + let deser_inputs = ~[ + ast::arg { + is_mutbl: false, + ty: ty_d, + pat: @ast::pat { + id: cx.next_id(), + node: ast::pat_ident(ast::bind_by_copy, + ast_util::ident_to_path(span, + cx.ident_of( + ~"__d")), + None), + span: span, + }, id: cx.next_id(), - node: ast::pat_ident( - ast::bind_by_copy, - ast_util::ident_to_path(span, cx.ident_of(~"__d")), - None), - span: span, - }, - id: cx.next_id(), - }]; + } + ]; let deser_decl = ast::fn_decl { inputs: deser_inputs, @@ -1120,7 +1121,6 @@ fn mk_enum_deser_body( ast::expr_fn_block( ast::fn_decl { inputs: ~[ast::arg { - mode: ast::infer(ext_cx.next_id()), is_mutbl: false, ty: @ast::Ty { id: ext_cx.next_id(), diff --git a/src/libsyntax/ext/build.rs b/src/libsyntax/ext/build.rs index c4c2fed778f..4c876669f47 100644 --- a/src/libsyntax/ext/build.rs +++ b/src/libsyntax/ext/build.rs @@ -419,7 +419,6 @@ pub fn mk_arg(cx: @ext_ctxt, -> ast::arg { let arg_pat = mk_pat_ident(cx, span, ident); ast::arg { - mode: ast::infer(cx.next_id()), is_mutbl: false, ty: ty, pat: arg_pat, diff --git a/src/libsyntax/ext/pipes/ast_builder.rs b/src/libsyntax/ext/pipes/ast_builder.rs index ede3711b052..deaf1b1c754 100644 --- a/src/libsyntax/ext/pipes/ast_builder.rs +++ b/src/libsyntax/ext/pipes/ast_builder.rs @@ -196,7 +196,6 @@ impl ext_ctxt_ast_builder for @ext_ctxt { fn arg(&self, name: ident, ty: @ast::Ty) -> ast::arg { ast::arg { - mode: ast::infer(self.next_id()), is_mutbl: false, ty: ty, pat: @ast::pat { |
