aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/ty/infer.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir/src/ty/infer.rs')
-rw-r--r--crates/ra_hir/src/ty/infer.rs4
1 files changed, 1 insertions, 3 deletions
diff --git a/crates/ra_hir/src/ty/infer.rs b/crates/ra_hir/src/ty/infer.rs
index 675df4a22..33bfd0952 100644
--- a/crates/ra_hir/src/ty/infer.rs
+++ b/crates/ra_hir/src/ty/infer.rs
@@ -1265,9 +1265,7 @@ impl<'a, D: HirDatabase> InferenceContext<'a, D> {
1265 Expr::BinaryOp { lhs, rhs, op } => match op { 1265 Expr::BinaryOp { lhs, rhs, op } => match op {
1266 Some(op) => { 1266 Some(op) => {
1267 let lhs_expectation = match op { 1267 let lhs_expectation = match op {
1268 BinaryOp::BooleanAnd | BinaryOp::BooleanOr => { 1268 BinaryOp::LogicOp(..) => Expectation::has_type(Ty::simple(TypeCtor::Bool)),
1269 Expectation::has_type(Ty::simple(TypeCtor::Bool))
1270 }
1271 _ => Expectation::none(), 1269 _ => Expectation::none(),
1272 }; 1270 };
1273 let lhs_ty = self.infer_expr(*lhs, &lhs_expectation); 1271 let lhs_ty = self.infer_expr(*lhs, &lhs_expectation);