summary refs log tree commit diff
path: root/src/libsyntax/ext
diff options
context:
space:
mode:
authorMichael Sullivan <sully@msully.net>2012-06-27 16:06:58 -0700
committerMichael Sullivan <sully@msully.net>2012-06-27 16:19:10 -0700
commit3297d465ca788fbb20a2430ced28420993deb8b7 (patch)
treef498345cf2cf00d7a6fc6675b86f392289f082a0 /src/libsyntax/ext
parent143c7a3d966a60cdb8457e2e07472fe3c2816bae (diff)
downloadrust-3297d465ca788fbb20a2430ced28420993deb8b7.tar.gz
rust-3297d465ca788fbb20a2430ced28420993deb8b7.zip
Have the syntax extension ast builders reserve the extra node ids required for overloading. Closes #2732.
Diffstat (limited to 'src/libsyntax/ext')
-rw-r--r--src/libsyntax/ext/build.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/libsyntax/ext/build.rs b/src/libsyntax/ext/build.rs
index 2e5fe63eb5a..adb0b26e646 100644
--- a/src/libsyntax/ext/build.rs
+++ b/src/libsyntax/ext/build.rs
@@ -20,11 +20,13 @@ fn mk_uint(cx: ext_ctxt, sp: span, u: uint) -> @ast::expr {
 fn mk_binary(cx: ext_ctxt, sp: span, op: ast::binop,
              lhs: @ast::expr, rhs: @ast::expr)
    -> @ast::expr {
+    cx.next_id(); // see ast_util::op_expr_callee_id
     let binexpr = ast::expr_binary(op, lhs, rhs);
     ret @{id: cx.next_id(), node: binexpr, span: sp};
 }
 fn mk_unary(cx: ext_ctxt, sp: span, op: ast::unop, e: @ast::expr)
     -> @ast::expr {
+    cx.next_id(); // see ast_util::op_expr_callee_id
     let expr = ast::expr_unary(op, e);
     ret @{id: cx.next_id(), node: expr, span: sp};
 }