Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide-db/src/symbol_index.rs')
| -rw-r--r-- | crates/ide-db/src/symbol_index.rs | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/crates/ide-db/src/symbol_index.rs b/crates/ide-db/src/symbol_index.rs index e15d0b33bb..eb0529d6b5 100644 --- a/crates/ide-db/src/symbol_index.rs +++ b/crates/ide-db/src/symbol_index.rs @@ -27,7 +27,7 @@ use std::{ ops::ControlFlow, }; -use base_db::{RootQueryDb, SourceRootId}; +use base_db::{LibraryRoots, LocalRoots, RootQueryDb, SourceRootId}; use fst::{Automaton, Streamer, raw::IndexedValue}; use hir::{ Crate, Module, @@ -36,7 +36,6 @@ use hir::{ symbols::{FileSymbol, SymbolCollector}, }; use rayon::prelude::*; -use rustc_hash::FxHashSet; use salsa::Update; use crate::RootDatabase; @@ -102,22 +101,6 @@ impl Query { } } -/// The set of roots for crates.io libraries. -/// Files in libraries are assumed to never change. -#[salsa::input(singleton, debug)] -pub struct LibraryRoots { - #[returns(ref)] - pub roots: FxHashSet<SourceRootId>, -} - -/// The set of "local" (that is, from the current workspace) roots. -/// Files in local roots are assumed to change frequently. -#[salsa::input(singleton, debug)] -pub struct LocalRoots { - #[returns(ref)] - pub roots: FxHashSet<SourceRootId>, -} - /// The symbol indices of modules that make up a given crate. pub fn crate_symbols(db: &dyn HirDatabase, krate: Crate) -> Box<[&SymbolIndex<'_>]> { let _p = tracing::info_span!("crate_symbols").entered(); @@ -443,6 +426,7 @@ impl Query { mod tests { use expect_test::expect_file; + use rustc_hash::FxHashSet; use salsa::Setter; use test_fixture::{WORKSPACE, WithFixture}; |