Unnamed repository; edit this file 'description' to name the repository.
-rw-r--r--crates/hir/src/lib.rs2
-rw-r--r--crates/ide-db/src/prime_caches.rs7
2 files changed, 7 insertions, 2 deletions
diff --git a/crates/hir/src/lib.rs b/crates/hir/src/lib.rs
index f2faf99fc9..33607df864 100644
--- a/crates/hir/src/lib.rs
+++ b/crates/hir/src/lib.rs
@@ -133,7 +133,7 @@ pub use {
attr::{AttrSourceMap, Attrs, AttrsWithOwner},
find_path::PrefixKind,
import_map,
- lang_item::LangItem,
+ lang_item::{LangItem, crate_lang_items},
nameres::{DefMap, ModuleSource, crate_def_map},
per_ns::Namespace,
type_ref::{Mutability, TypeRef},
diff --git a/crates/ide-db/src/prime_caches.rs b/crates/ide-db/src/prime_caches.rs
index e6618573e0..9628995e31 100644
--- a/crates/ide-db/src/prime_caches.rs
+++ b/crates/ide-db/src/prime_caches.rs
@@ -83,7 +83,12 @@ pub fn parallel_prime_caches(
crate_name,
})?;
- let cancelled = Cancelled::catch(|| _ = hir::crate_def_map(&db, crate_id));
+ let cancelled = Cancelled::catch(|| {
+ _ = hir::crate_def_map(&db, crate_id);
+ // we compute the lang items here as the work for them is also highly recursive and will be trigger by the module symbols query
+ // slowing down leaf crate analysis tremendously as we go back to being blocked on a single thread
+ _ = hir::crate_lang_items(&db, crate_id);
+ });
match cancelled {
Ok(()) => progress_sender