aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_syntax/src
diff options
context:
space:
mode:
authorMarcus Klaas de Vries <[email protected]>2019-01-07 19:11:31 +0000
committerMarcus Klaas de Vries <[email protected]>2019-01-07 19:11:31 +0000
commit7b0eaef58072acc087d23faca5a9f9879f1765d5 (patch)
tree753250bc428b0313faac6de7622686c445ef7dd6 /crates/ra_syntax/src
parent3238c06a5a122b7e7b9b6871484c700b7947fae1 (diff)
Implement type inference for more binary operators
Mostly just for primitive numeric types such as u32 and f64. Not yet a general solution using trait resolution.
Diffstat (limited to 'crates/ra_syntax/src')
-rw-r--r--crates/ra_syntax/src/ast.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_syntax/src/ast.rs b/crates/ra_syntax/src/ast.rs
index d8e187514..9ab59738f 100644
--- a/crates/ra_syntax/src/ast.rs
+++ b/crates/ra_syntax/src/ast.rs
@@ -549,7 +549,7 @@ pub enum BinOp {
549 /// The `&=` operator for assignment after bitwise AND 549 /// The `&=` operator for assignment after bitwise AND
550 BitAndAssign, 550 BitAndAssign,
551 /// The `^=` operator for assignment after bitwise XOR 551 /// The `^=` operator for assignment after bitwise XOR
552 BitXorAssin, 552 BitXorAssign,
553} 553}
554 554
555impl<'a> BinExpr<'a> { 555impl<'a> BinExpr<'a> {
@@ -586,7 +586,7 @@ impl<'a> BinExpr<'a> {
586 MINUSEQ => Some(BinOp::SubAssign), 586 MINUSEQ => Some(BinOp::SubAssign),
587 PIPEEQ => Some(BinOp::BitOrAssign), 587 PIPEEQ => Some(BinOp::BitOrAssign),
588 AMPEQ => Some(BinOp::BitAndAssign), 588 AMPEQ => Some(BinOp::BitAndAssign),
589 CARETEQ => Some(BinOp::BitXorAssin), 589 CARETEQ => Some(BinOp::BitXorAssign),
590 _ => None, 590 _ => None,
591 }) 591 })
592 .next() 592 .next()