File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed
src/tools/rust-analyzer/crates Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff 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 } ,
Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments