From 7b0eaef58072acc087d23faca5a9f9879f1765d5 Mon Sep 17 00:00:00 2001 From: Marcus Klaas de Vries Date: Mon, 7 Jan 2019 20:11:31 +0100 Subject: 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. --- crates/ra_syntax/src/ast.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'crates/ra_syntax') 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 { /// The `&=` operator for assignment after bitwise AND BitAndAssign, /// The `^=` operator for assignment after bitwise XOR - BitXorAssin, + BitXorAssign, } impl<'a> BinExpr<'a> { @@ -586,7 +586,7 @@ impl<'a> BinExpr<'a> { MINUSEQ => Some(BinOp::SubAssign), PIPEEQ => Some(BinOp::BitOrAssign), AMPEQ => Some(BinOp::BitAndAssign), - CARETEQ => Some(BinOp::BitXorAssin), + CARETEQ => Some(BinOp::BitXorAssign), _ => None, }) .next() -- cgit v1.2.3