Skip to content

Commit 5107faa

Browse files
committed
Prime lang item queries
1 parent 5d7a7a3 commit 5107faa

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

crates/hir/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ pub use {
133133
attr::{AttrSourceMap, Attrs, AttrsWithOwner},
134134
find_path::PrefixKind,
135135
import_map,
136-
lang_item::LangItem,
136+
lang_item::{LangItem, crate_lang_items},
137137
nameres::{DefMap, ModuleSource, crate_def_map},
138138
per_ns::Namespace,
139139
type_ref::{Mutability, TypeRef},

crates/ide-db/src/prime_caches.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,12 @@ pub fn parallel_prime_caches(
8383
crate_name,
8484
})?;
8585

86-
let cancelled = Cancelled::catch(|| _ = hir::crate_def_map(&db, crate_id));
86+
let cancelled = Cancelled::catch(|| {
87+
_ = hir::crate_def_map(&db, crate_id);
88+
// we compute the lang items here as the work for them is also highly recursive and will be trigger by the module symbols query
89+
// slowing down leaf crate analysis tremendously as we go back to being blocked on a single thread
90+
_ = hir::crate_lang_items(&db, crate_id);
91+
});
8792

8893
match cancelled {
8994
Ok(()) => progress_sender

0 commit comments

Comments
 (0)