about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--Cargo.lock9
-rw-r--r--Cargo.toml19
-rw-r--r--crates/base-db/Cargo.toml8
-rw-r--r--crates/hir-ty/src/consteval.rs8
-rw-r--r--crates/hir-ty/src/layout.rs3
-rw-r--r--crates/hir-ty/src/layout/adt.rs3
-rw-r--r--crates/hir-ty/src/lower.rs10
-rw-r--r--crates/hir-ty/src/mir/lower.rs4
-rw-r--r--crates/hir-ty/src/mir/monomorphization.rs3
9 files changed, 35 insertions, 32 deletions
diff --git a/Cargo.lock b/Cargo.lock
index 876ba2546a3..0d624c79074 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -1569,11 +1569,10 @@ dependencies = [
 
 [[package]]
 name = "rust-analyzer-salsa"
-version = "0.17.0-pre.3"
+version = "0.17.0-pre.4"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4ca92b657d614d076800aa7bf5d5ba33564e71fa7f16cd79eacdfe301a50ab1c"
+checksum = "16c42b8737c320578b441a82daf7cdf8d897468de64e8a774fa54b53a50b6cc0"
 dependencies = [
- "crossbeam-utils",
  "indexmap",
  "lock_api",
  "log",
@@ -1586,9 +1585,9 @@ dependencies = [
 
 [[package]]
 name = "rust-analyzer-salsa-macros"
-version = "0.17.0-pre.3"
+version = "0.17.0-pre.4"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b190359266d293f2ee13eaa502a766dc8b77b63fbaa5d460d24fd0210675ceef"
+checksum = "db72b0883f3592ade2be15a10583c75e0b269ec26e1190800fda2e2ce5ae6634"
 dependencies = [
  "heck",
  "proc-macro2",
diff --git a/Cargo.toml b/Cargo.toml
index 272f456bf9f..17810d0f299 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -42,7 +42,7 @@ debug = 0
 
 # ungrammar = { path = "../ungrammar" }
 
-# salsa = { path = "../salsa" }
+# rust-analyzer-salsa = { path = "../salsa" }
 
 [workspace.dependencies]
 # local crates
@@ -98,11 +98,19 @@ either = "1.9.0"
 indexmap = "2.1.0"
 itertools = "0.12.0"
 libc = "0.2.150"
+nohash-hasher = "0.2.0"
+rayon = "1.8.0"
+rust-analyzer-salsa = "0.17.0-pre.4"
+rustc-hash = "1.1.0"
+serde = { version = "1.0.192", features = ["derive"] }
+serde_json = "1.0.108"
 smallvec = { version = "1.10.0", features = [
   "const_new",
   "union",
   "const_generics",
 ] }
+smol_str = "0.2.0"
+text-size = "1.1.1"
 tracing = "0.1.40"
 tracing-tree = "0.3.0"
 tracing-subscriber = { version = "0.3.18", default-features = false, features = [
@@ -110,15 +118,10 @@ tracing-subscriber = { version = "0.3.18", default-features = false, features =
     "fmt",
     "tracing-log",
 ] }
-smol_str = "0.2.0"
-nohash-hasher = "0.2.0"
-text-size = "1.1.1"
-rayon = "1.8.0"
-serde = { version = "1.0.192", features = ["derive"] }
-serde_json = "1.0.108"
 triomphe = { version = "0.1.10", default-features = false, features = ["std"] }
+xshell = "0.2.5"
+
 # can't upgrade due to dashmap depending on 0.12.3 currently
 hashbrown = { version = "0.12.3", features = [
   "inline-more",
 ], default-features = false }
-xshell = "0.2.5"
diff --git a/crates/base-db/Cargo.toml b/crates/base-db/Cargo.toml
index 5ad88f65188..393ffe155ba 100644
--- a/crates/base-db/Cargo.toml
+++ b/crates/base-db/Cargo.toml
@@ -12,12 +12,10 @@ rust-version.workspace = true
 doctest = false
 
 [dependencies]
-rust-analyzer-salsa = "0.17.0-pre.3"
-rustc-hash = "1.1.0"
-
-triomphe.workspace = true
-
 la-arena.workspace = true
+rust-analyzer-salsa.workspace = true
+rustc-hash.workspace = true
+triomphe.workspace = true
 
 # local deps
 cfg.workspace = true
diff --git a/crates/hir-ty/src/consteval.rs b/crates/hir-ty/src/consteval.rs
index 0348680e5da..576a07d4fb6 100644
--- a/crates/hir-ty/src/consteval.rs
+++ b/crates/hir-ty/src/consteval.rs
@@ -1,6 +1,6 @@
 //! Constant evaluation details
 
-use base_db::CrateId;
+use base_db::{salsa::Cycle, CrateId};
 use chalk_ir::{cast::Cast, BoundVar, DebruijnIndex};
 use hir_def::{
     hir::Expr,
@@ -184,7 +184,7 @@ pub fn try_const_usize(db: &dyn HirDatabase, c: &Const) -> Option<u128> {
 
 pub(crate) fn const_eval_recover(
     _: &dyn HirDatabase,
-    _: &[String],
+    _: &Cycle,
     _: &GeneralConstId,
     _: &Substitution,
     _: &Option<Arc<TraitEnvironment>>,
@@ -194,7 +194,7 @@ pub(crate) fn const_eval_recover(
 
 pub(crate) fn const_eval_static_recover(
     _: &dyn HirDatabase,
-    _: &[String],
+    _: &Cycle,
     _: &StaticId,
 ) -> Result<Const, ConstEvalError> {
     Err(ConstEvalError::MirLowerError(MirLowerError::Loop))
@@ -202,7 +202,7 @@ pub(crate) fn const_eval_static_recover(
 
 pub(crate) fn const_eval_discriminant_recover(
     _: &dyn HirDatabase,
-    _: &[String],
+    _: &Cycle,
     _: &EnumVariantId,
 ) -> Result<i128, ConstEvalError> {
     Err(ConstEvalError::MirLowerError(MirLowerError::Loop))
diff --git a/crates/hir-ty/src/layout.rs b/crates/hir-ty/src/layout.rs
index 27c79499868..bfc4f1383ec 100644
--- a/crates/hir-ty/src/layout.rs
+++ b/crates/hir-ty/src/layout.rs
@@ -2,6 +2,7 @@
 
 use std::fmt;
 
+use base_db::salsa::Cycle;
 use chalk_ir::{AdtId, FloatTy, IntTy, TyKind, UintTy};
 use hir_def::{
     layout::{
@@ -431,7 +432,7 @@ pub fn layout_of_ty_query(
 
 pub fn layout_of_ty_recover(
     _: &dyn HirDatabase,
-    _: &[String],
+    _: &Cycle,
     _: &Ty,
     _: &Arc<TraitEnvironment>,
 ) -> Result<Arc<Layout>, LayoutError> {
diff --git a/crates/hir-ty/src/layout/adt.rs b/crates/hir-ty/src/layout/adt.rs
index 58a06dc6435..39788a95029 100644
--- a/crates/hir-ty/src/layout/adt.rs
+++ b/crates/hir-ty/src/layout/adt.rs
@@ -2,6 +2,7 @@
 
 use std::{cmp, ops::Bound};
 
+use base_db::salsa::Cycle;
 use hir_def::{
     data::adt::VariantData,
     layout::{Integer, LayoutCalculator, ReprOptions, TargetDataLayout},
@@ -140,7 +141,7 @@ fn layout_scalar_valid_range(db: &dyn HirDatabase, def: AdtId) -> (Bound<u128>,
 
 pub fn layout_of_adt_recover(
     _: &dyn HirDatabase,
-    _: &[String],
+    _: &Cycle,
     _: &AdtId,
     _: &Substitution,
     _: &Arc<TraitEnvironment>,
diff --git a/crates/hir-ty/src/lower.rs b/crates/hir-ty/src/lower.rs
index 30ebd1f92e0..2a6d69e7fc6 100644
--- a/crates/hir-ty/src/lower.rs
+++ b/crates/hir-ty/src/lower.rs
@@ -10,7 +10,7 @@ use std::{
     iter,
 };
 
-use base_db::CrateId;
+use base_db::{salsa::Cycle, CrateId};
 use chalk_ir::{
     cast::Cast, fold::Shift, fold::TypeFoldable, interner::HasInterner, Mutability, Safety,
 };
@@ -1454,7 +1454,7 @@ pub(crate) fn generic_predicates_for_param_query(
 
 pub(crate) fn generic_predicates_for_param_recover(
     _db: &dyn HirDatabase,
-    _cycle: &[String],
+    _cycle: &Cycle,
     _def: &GenericDefId,
     _param_id: &TypeOrConstParamId,
     _assoc_name: &Option<Name>,
@@ -1637,7 +1637,7 @@ pub(crate) fn generic_defaults_query(
 
 pub(crate) fn generic_defaults_recover(
     db: &dyn HirDatabase,
-    _cycle: &[String],
+    _cycle: &Cycle,
     def: &GenericDefId,
 ) -> Arc<[Binders<crate::GenericArg>]> {
     let generic_params = generics(db.upcast(), *def);
@@ -1865,7 +1865,7 @@ pub(crate) fn ty_query(db: &dyn HirDatabase, def: TyDefId) -> Binders<Ty> {
     }
 }
 
-pub(crate) fn ty_recover(db: &dyn HirDatabase, _cycle: &[String], def: &TyDefId) -> Binders<Ty> {
+pub(crate) fn ty_recover(db: &dyn HirDatabase, _cycle: &Cycle, def: &TyDefId) -> Binders<Ty> {
     let generics = match *def {
         TyDefId::BuiltinType(_) => return Binders::empty(Interner, TyKind::Error.intern(Interner)),
         TyDefId::AdtId(it) => generics(db.upcast(), it.into()),
@@ -1915,7 +1915,7 @@ pub(crate) fn const_param_ty_query(db: &dyn HirDatabase, def: ConstParamId) -> T
 
 pub(crate) fn impl_self_ty_recover(
     db: &dyn HirDatabase,
-    _cycle: &[String],
+    _cycle: &Cycle,
     impl_id: &ImplId,
 ) -> Binders<Ty> {
     let generics = generics(db.upcast(), (*impl_id).into());
diff --git a/crates/hir-ty/src/mir/lower.rs b/crates/hir-ty/src/mir/lower.rs
index 922aee011cf..639fabc198c 100644
--- a/crates/hir-ty/src/mir/lower.rs
+++ b/crates/hir-ty/src/mir/lower.rs
@@ -2,7 +2,7 @@
 
 use std::{fmt::Write, iter, mem};
 
-use base_db::FileId;
+use base_db::{salsa::Cycle, FileId};
 use chalk_ir::{BoundVar, ConstData, DebruijnIndex, TyKind};
 use hir_def::{
     body::Body,
@@ -2110,7 +2110,7 @@ pub fn mir_body_query(db: &dyn HirDatabase, def: DefWithBodyId) -> Result<Arc<Mi
 
 pub fn mir_body_recover(
     _db: &dyn HirDatabase,
-    _cycle: &[String],
+    _cycle: &Cycle,
     _def: &DefWithBodyId,
 ) -> Result<Arc<MirBody>> {
     Err(MirLowerError::Loop)
diff --git a/crates/hir-ty/src/mir/monomorphization.rs b/crates/hir-ty/src/mir/monomorphization.rs
index 7d2bb95d931..8da03eef2e0 100644
--- a/crates/hir-ty/src/mir/monomorphization.rs
+++ b/crates/hir-ty/src/mir/monomorphization.rs
@@ -9,6 +9,7 @@
 
 use std::mem;
 
+use base_db::salsa::Cycle;
 use chalk_ir::{
     fold::{FallibleTypeFolder, TypeFoldable, TypeSuperFoldable},
     ConstData, DebruijnIndex,
@@ -300,7 +301,7 @@ pub fn monomorphized_mir_body_query(
 
 pub fn monomorphized_mir_body_recover(
     _: &dyn HirDatabase,
-    _: &[String],
+    _: &Cycle,
     _: &DefWithBodyId,
     _: &Substitution,
     _: &Arc<crate::TraitEnvironment>,