aboutsummaryrefslogtreecommitdiff
path: root/crates
diff options
context:
space:
mode:
Diffstat (limited to 'crates')
-rw-r--r--crates/hir_def/src/nameres/collector.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/crates/hir_def/src/nameres/collector.rs b/crates/hir_def/src/nameres/collector.rs
index bc286a8a3..952a04b35 100644
--- a/crates/hir_def/src/nameres/collector.rs
+++ b/crates/hir_def/src/nameres/collector.rs
@@ -420,7 +420,11 @@ impl DefCollector<'_> {
420 .as_ident() 420 .as_ident()
421 .expect("extern crate should have been desugared to one-element path"), 421 .expect("extern crate should have been desugared to one-element path"),
422 ); 422 );
423 PartialResolvedImport::Resolved(res) 423 if res.is_none() {
424 PartialResolvedImport::Unresolved
425 } else {
426 PartialResolvedImport::Resolved(res)
427 }
424 } else { 428 } else {
425 let res = self.def_map.resolve_path_fp_with_macro( 429 let res = self.def_map.resolve_path_fp_with_macro(
426 self.db, 430 self.db,