diff options
Diffstat (limited to 'crates/ra_hir/src/ty.rs')
-rw-r--r-- | crates/ra_hir/src/ty.rs | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/crates/ra_hir/src/ty.rs b/crates/ra_hir/src/ty.rs index 37715a903..81cff8c47 100644 --- a/crates/ra_hir/src/ty.rs +++ b/crates/ra_hir/src/ty.rs | |||
@@ -1588,9 +1588,17 @@ impl<'a, D: HirDatabase> InferenceContext<'a, D> { | |||
1588 | _ => Ty::Unknown, | 1588 | _ => Ty::Unknown, |
1589 | } | 1589 | } |
1590 | } | 1590 | } |
1591 | UnaryOp::Not if inner_ty == Ty::Bool => Ty::Bool, | 1591 | UnaryOp::Not => { |
1592 | // TODO: resolve ops::Not trait for inner_ty | 1592 | match inner_ty { |
1593 | UnaryOp::Not => Ty::Unknown, | 1593 | Ty::Bool |
1594 | | Ty::Int(primitive::UncertainIntTy::Unknown) | ||
1595 | | Ty::Int(primitive::UncertainIntTy::Signed(..)) | ||
1596 | | Ty::Int(primitive::UncertainIntTy::Unsigned(..)) | ||
1597 | | Ty::Infer(InferTy::IntVar(..)) => inner_ty, | ||
1598 | // TODO: resolve ops::Not trait for inner_ty | ||
1599 | _ => Ty::Unknown, | ||
1600 | } | ||
1601 | } | ||
1594 | } | 1602 | } |
1595 | } | 1603 | } |
1596 | Expr::BinaryOp { lhs, rhs, op } => match op { | 1604 | Expr::BinaryOp { lhs, rhs, op } => match op { |