Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir-ty/src/infer/path.rs')
-rw-r--r--crates/hir-ty/src/infer/path.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/crates/hir-ty/src/infer/path.rs b/crates/hir-ty/src/infer/path.rs
index 49fb78f67a..e61a070265 100644
--- a/crates/hir-ty/src/infer/path.rs
+++ b/crates/hir-ty/src/infer/path.rs
@@ -340,6 +340,9 @@ impl InferenceContext<'_> {
},
);
let res = res.or(not_visible);
+ if res.is_none() {
+ self.push_diagnostic(InferenceDiagnostic::UnresolvedAssocItem { id });
+ }
let (item, visible) = res?;
let (def, container) = match item {