diff options
| author | Patrick Walton <pcwalton@mimiga.net> | 2013-03-05 18:22:13 -0800 |
|---|---|---|
| committer | Patrick Walton <pcwalton@mimiga.net> | 2013-03-07 22:32:55 -0800 |
| commit | 954ae9c975cebb7186dfc1182a68d2559bdef4bd (patch) | |
| tree | 32be334480b45806ecd242400f23b42befa4e648 /src/libsyntax/ext | |
| parent | 4e3dbfe05257b4f5862e7b57777cba6d179d9cc0 (diff) | |
| download | rust-954ae9c975cebb7186dfc1182a68d2559bdef4bd.tar.gz rust-954ae9c975cebb7186dfc1182a68d2559bdef4bd.zip | |
libsyntax: Remove struct literal expressions from the compiler
Diffstat (limited to 'src/libsyntax/ext')
| -rw-r--r-- | src/libsyntax/ext/build.rs | 7 | ||||
| -rw-r--r-- | src/libsyntax/ext/log_syntax.rs | 5 |
2 files changed, 4 insertions, 8 deletions
diff --git a/src/libsyntax/ext/build.rs b/src/libsyntax/ext/build.rs index a42564ff2ec..5d071b8d517 100644 --- a/src/libsyntax/ext/build.rs +++ b/src/libsyntax/ext/build.rs @@ -162,13 +162,6 @@ pub fn mk_field(sp: span, f: &Field) -> ast::field { pub fn mk_fields(sp: span, fields: ~[Field]) -> ~[ast::field] { fields.map(|f| mk_field(sp, f)) } -pub fn mk_rec_e(cx: ext_ctxt, - sp: span, - +fields: ~[Field]) - -> @ast::expr { - mk_expr(cx, sp, ast::expr_rec(mk_fields(sp, fields), - option::None::<@ast::expr>)) -} pub fn mk_struct_e(cx: ext_ctxt, sp: span, +ctor_path: ~[ast::ident], diff --git a/src/libsyntax/ext/log_syntax.rs b/src/libsyntax/ext/log_syntax.rs index 9072f4bdd01..8a8583420f8 100644 --- a/src/libsyntax/ext/log_syntax.rs +++ b/src/libsyntax/ext/log_syntax.rs @@ -32,7 +32,10 @@ pub fn expand_syntax_ext(cx: ext_ctxt, MRExpr(@ast::expr { id: cx.next_id(), callee_id: cx.next_id(), - node: ast::expr_rec(~[], option::None), + node: ast::expr_lit(@codemap::spanned { + node: ast::lit_nil, + span: sp + }), span: sp, }) } |
