Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/base-db/src/lib.rs')
-rw-r--r--crates/base-db/src/lib.rs24
1 files changed, 0 insertions, 24 deletions
diff --git a/crates/base-db/src/lib.rs b/crates/base-db/src/lib.rs
index 90e0aa9065..4d226f5cbf 100644
--- a/crates/base-db/src/lib.rs
+++ b/crates/base-db/src/lib.rs
@@ -257,13 +257,6 @@ pub trait RootQueryDb: SourceDatabase + salsa::Database {
#[salsa::input]
fn all_crates(&self) -> Arc<Box<[Crate]>>;
- /// Returns an iterator over all transitive dependencies of the given crate,
- /// including the crate itself.
- ///
- /// **Warning**: do not use this query in `hir-*` crates! It kills incrementality across crate metadata modifications.
- #[salsa::transparent]
- fn transitive_deps(&self, crate_id: Crate) -> FxHashSet<Crate>;
-
/// Returns all transitive reverse dependencies of the given crate,
/// including the crate itself.
///
@@ -273,23 +266,6 @@ pub trait RootQueryDb: SourceDatabase + salsa::Database {
fn transitive_rev_deps(&self, of: Crate) -> FxHashSet<Crate>;
}
-fn transitive_deps(db: &dyn SourceDatabase, crate_id: Crate) -> FxHashSet<Crate> {
- // There is a bit of duplication here and in `CrateGraphBuilder` in the same method, but it's not terrible
- // and removing that is a bit difficult.
- let mut worklist = vec![crate_id];
- let mut deps = FxHashSet::default();
-
- while let Some(krate) = worklist.pop() {
- if !deps.insert(krate) {
- continue;
- }
-
- worklist.extend(krate.data(db).dependencies.iter().map(|dep| dep.crate_id));
- }
-
- deps
-}
-
#[salsa_macros::db]
pub trait SourceDatabase: salsa::Database {
/// Text of the file.