aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_def
diff options
context:
space:
mode:
authorJonas Schievink <[email protected]>2020-09-16 14:46:56 +0100
committerJonas Schievink <[email protected]>2020-09-16 16:26:51 +0100
commit4ac9a2e5d3c43401450b812786ab1551d535420c (patch)
tree6baf7884970c843a33bb3d629596527b25f63aa8 /crates/hir_def
parent2a9a66d25485036455eac54747a83ac7c6557d44 (diff)
Leave extern crate items unresolved if they are
Diffstat (limited to 'crates/hir_def')
-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,