aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir
diff options
context:
space:
mode:
authorMarco Groppo <[email protected]>2019-03-24 21:21:22 +0000
committerMarco Groppo <[email protected]>2019-03-24 21:21:22 +0000
commit67055c47da2c94188540847b33921af25652156a (patch)
treed13ddcbec7ea7f12796aa06e4e37a6b6bfc7bb30 /crates/ra_hir
parentacac7415a6291efe5209c811dbb5b951ecf79198 (diff)
Target only the actual operator.
Renamed `BinExpr::op()` and `PrefixExpr::op()` to `op_kind`. Now `op()` returns the `SyntaxNode`.
Diffstat (limited to 'crates/ra_hir')
-rw-r--r--crates/ra_hir/src/expr.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_hir/src/expr.rs b/crates/ra_hir/src/expr.rs
index 703d99d9b..c37fd0454 100644
--- a/crates/ra_hir/src/expr.rs
+++ b/crates/ra_hir/src/expr.rs
@@ -680,7 +680,7 @@ impl ExprCollector {
680 } 680 }
681 ast::ExprKind::PrefixExpr(e) => { 681 ast::ExprKind::PrefixExpr(e) => {
682 let expr = self.collect_expr_opt(e.expr()); 682 let expr = self.collect_expr_opt(e.expr());
683 if let Some(op) = e.op() { 683 if let Some(op) = e.op_kind() {
684 self.alloc_expr(Expr::UnaryOp { expr, op }, syntax_ptr) 684 self.alloc_expr(Expr::UnaryOp { expr, op }, syntax_ptr)
685 } else { 685 } else {
686 self.alloc_expr(Expr::Missing, syntax_ptr) 686 self.alloc_expr(Expr::Missing, syntax_ptr)
@@ -703,7 +703,7 @@ impl ExprCollector {
703 ast::ExprKind::BinExpr(e) => { 703 ast::ExprKind::BinExpr(e) => {
704 let lhs = self.collect_expr_opt(e.lhs()); 704 let lhs = self.collect_expr_opt(e.lhs());
705 let rhs = self.collect_expr_opt(e.rhs()); 705 let rhs = self.collect_expr_opt(e.rhs());
706 let op = e.op(); 706 let op = e.op_kind();
707 self.alloc_expr(Expr::BinaryOp { lhs, rhs, op }, syntax_ptr) 707 self.alloc_expr(Expr::BinaryOp { lhs, rhs, op }, syntax_ptr)
708 } 708 }
709 ast::ExprKind::TupleExpr(e) => { 709 ast::ExprKind::TupleExpr(e) => {