Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir-ty/src/infer/unify.rs')
-rw-r--r--crates/hir-ty/src/infer/unify.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/crates/hir-ty/src/infer/unify.rs b/crates/hir-ty/src/infer/unify.rs
index f9ad76b0c1..6500eb213c 100644
--- a/crates/hir-ty/src/infer/unify.rs
+++ b/crates/hir-ty/src/infer/unify.rs
@@ -577,7 +577,8 @@ pub(super) mod resolve_completely {
diagnostics.retain_mut(|diagnostic| {
self.resolve_completely(diagnostic);
- if let InferenceDiagnostic::ExpectedFunction { found: ty, .. }
+ if let InferenceDiagnostic::CannotBeDereferenced { found: ty, .. }
+ | InferenceDiagnostic::ExpectedFunction { found: ty, .. }
| InferenceDiagnostic::ExpectedArrayOrSlicePat { found: ty, .. }
| InferenceDiagnostic::UnresolvedField { receiver: ty, .. }
| InferenceDiagnostic::UnresolvedMethodCall { receiver: ty, .. } = diagnostic