diff options
-rw-r--r-- | crates/ra_hir/src/ty/infer.rs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/crates/ra_hir/src/ty/infer.rs b/crates/ra_hir/src/ty/infer.rs index fdb444de2..1ee40c70a 100644 --- a/crates/ra_hir/src/ty/infer.rs +++ b/crates/ra_hir/src/ty/infer.rs | |||
@@ -1126,10 +1126,12 @@ impl<'a, D: HirDatabase> InferenceContext<'a, D> { | |||
1126 | let inner_ty = self.infer_expr(*expr, &Expectation::none()); | 1126 | let inner_ty = self.infer_expr(*expr, &Expectation::none()); |
1127 | match op { | 1127 | match op { |
1128 | UnaryOp::Deref => { | 1128 | UnaryOp::Deref => { |
1129 | if let Some(derefed_ty) = inner_ty.builtin_deref() { | 1129 | let canonicalized = self.canonicalizer().canonicalize_ty(inner_ty); |
1130 | derefed_ty | 1130 | if let Some(derefed_ty) = |
1131 | autoderef::deref(self.db, &self.resolver, &canonicalized.value) | ||
1132 | { | ||
1133 | canonicalized.decanonicalize_ty(derefed_ty.value) | ||
1131 | } else { | 1134 | } else { |
1132 | // FIXME Deref::deref | ||
1133 | Ty::Unknown | 1135 | Ty::Unknown |
1134 | } | 1136 | } |
1135 | } | 1137 | } |