summary refs log tree commit diff
path: root/src/libsyntax/ext
diff options
context:
space:
mode:
authorHuon Wilson <dbau.pp+github@gmail.com>2015-01-13 14:24:37 +1100
committerHuon Wilson <dbau.pp+github@gmail.com>2015-01-25 00:33:50 +1100
commit2e888d0341e81de1744b257c25b012c2c148f0ba (patch)
treec1d2c0cfdd93246cd88388f2a93ef83471ff1423 /src/libsyntax/ext
parent4be79d6acde9eed3a9b5281a46f385bcb4ce736c (diff)
downloadrust-2e888d0341e81de1744b257c25b012c2c148f0ba.tar.gz
rust-2e888d0341e81de1744b257c25b012c2c148f0ba.zip
Add the span of the operator itself to ast::BinOp.
Diffstat (limited to 'src/libsyntax/ext')
-rw-r--r--src/libsyntax/ext/build.rs6
-rw-r--r--src/libsyntax/ext/deriving/generic/mod.rs2
2 files changed, 4 insertions, 4 deletions
diff --git a/src/libsyntax/ext/build.rs b/src/libsyntax/ext/build.rs
index 92619cf42e4..2b3a7212683 100644
--- a/src/libsyntax/ext/build.rs
+++ b/src/libsyntax/ext/build.rs
@@ -106,7 +106,7 @@ pub trait AstBuilder {
     fn expr_ident(&self, span: Span, id: ast::Ident) -> P<ast::Expr>;
 
     fn expr_self(&self, span: Span) -> P<ast::Expr>;
-    fn expr_binary(&self, sp: Span, op: ast::BinOp,
+    fn expr_binary(&self, sp: Span, op: ast::BinOp_,
                    lhs: P<ast::Expr>, rhs: P<ast::Expr>) -> P<ast::Expr>;
     fn expr_deref(&self, sp: Span, e: P<ast::Expr>) -> P<ast::Expr>;
     fn expr_unary(&self, sp: Span, op: ast::UnOp, e: P<ast::Expr>) -> P<ast::Expr>;
@@ -561,9 +561,9 @@ impl<'a> AstBuilder for ExtCtxt<'a> {
         self.expr_ident(span, special_idents::self_)
     }
 
-    fn expr_binary(&self, sp: Span, op: ast::BinOp,
+    fn expr_binary(&self, sp: Span, op: ast::BinOp_,
                    lhs: P<ast::Expr>, rhs: P<ast::Expr>) -> P<ast::Expr> {
-        self.expr(sp, ast::ExprBinary(op, lhs, rhs))
+        self.expr(sp, ast::ExprBinary(Spanned { node: op, span: sp }, lhs, rhs))
     }
 
     fn expr_deref(&self, sp: Span, e: P<ast::Expr>) -> P<ast::Expr> {
diff --git a/src/libsyntax/ext/deriving/generic/mod.rs b/src/libsyntax/ext/deriving/generic/mod.rs
index 272b0464010..f8812f4d28d 100644
--- a/src/libsyntax/ext/deriving/generic/mod.rs
+++ b/src/libsyntax/ext/deriving/generic/mod.rs
@@ -1449,7 +1449,7 @@ pub fn cs_same_method_fold<F>(use_foldl: bool,
 /// Use a given binop to combine the result of calling the derived method
 /// on all the fields.
 #[inline]
-pub fn cs_binop(binop: ast::BinOp, base: P<Expr>,
+pub fn cs_binop(binop: ast::BinOp_, base: P<Expr>,
                 enum_nonmatch_f: EnumNonMatchCollapsedFunc,
                 cx: &mut ExtCtxt, trait_span: Span,
                 substructure: &Substructure) -> P<Expr> {