Leave extern crate items unresolved if they are

This commit is contained in:
Jonas Schievink 2020-09-16 15:46:56 +02:00
parent 2a9a66d254
commit 4ac9a2e5d3

View File

@ -420,7 +420,11 @@ impl DefCollector<'_> {
.as_ident()
.expect("extern crate should have been desugared to one-element path"),
);
PartialResolvedImport::Resolved(res)
if res.is_none() {
PartialResolvedImport::Unresolved
} else {
PartialResolvedImport::Resolved(res)
}
} else {
let res = self.def_map.resolve_path_fp_with_macro(
self.db,