We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
world_symbols()
1 parent 75ce5dc commit 7a27a27Copy full SHA for 7a27a27
crates/ide/src/lib.rs
@@ -481,12 +481,15 @@ impl Analysis {
481
// `world_symbols` currently clones the database to run stuff in parallel, which will make any query panic
482
// if we were to attach it here.
483
Cancelled::catch(|| {
484
- symbol_index::world_symbols(&self.db, query)
485
- .into_iter()
486
- .filter_map(|s| s.try_to_nav(&self.db))
487
- .take(limit)
488
- .map(UpmappingResult::call_site)
489
- .collect::<Vec<_>>()
+ let symbols = symbol_index::world_symbols(&self.db, query);
+ salsa::attach(&self.db, || {
+ symbols
+ .into_iter()
+ .filter_map(|s| s.try_to_nav(&self.db))
+ .take(limit)
490
+ .map(UpmappingResult::call_site)
491
+ .collect::<Vec<_>>()
492
+ })
493
})
494
}
495
0 commit comments