Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 45d8104

Browse files
committed
internal: Bump salsa
1 parent 311a5e9 commit 45d8104

File tree

9 files changed

+35
-32
lines changed

9 files changed

+35
-32
lines changed

Cargo.lock

Lines changed: 4 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ debug = 0
4242

4343
# ungrammar = { path = "../ungrammar" }
4444

45-
# salsa = { path = "../salsa" }
45+
# rust-analyzer-salsa = { path = "../salsa" }
4646

4747
[workspace.dependencies]
4848
# local crates
@@ -98,27 +98,30 @@ either = "1.9.0"
9898
indexmap = "2.1.0"
9999
itertools = "0.12.0"
100100
libc = "0.2.150"
101+
nohash-hasher = "0.2.0"
102+
rayon = "1.8.0"
103+
rust-analyzer-salsa = "0.17.0-pre.4"
104+
rustc-hash = "1.1.0"
105+
serde = { version = "1.0.192", features = ["derive"] }
106+
serde_json = "1.0.108"
101107
smallvec = { version = "1.10.0", features = [
102108
"const_new",
103109
"union",
104110
"const_generics",
105111
] }
112+
smol_str = "0.2.0"
113+
text-size = "1.1.1"
106114
tracing = "0.1.40"
107115
tracing-tree = "0.3.0"
108116
tracing-subscriber = { version = "0.3.18", default-features = false, features = [
109117
"registry",
110118
"fmt",
111119
"tracing-log",
112120
] }
113-
smol_str = "0.2.0"
114-
nohash-hasher = "0.2.0"
115-
text-size = "1.1.1"
116-
rayon = "1.8.0"
117-
serde = { version = "1.0.192", features = ["derive"] }
118-
serde_json = "1.0.108"
119121
triomphe = { version = "0.1.10", default-features = false, features = ["std"] }
122+
xshell = "0.2.5"
123+
120124
# can't upgrade due to dashmap depending on 0.12.3 currently
121125
hashbrown = { version = "0.12.3", features = [
122126
"inline-more",
123127
], default-features = false }
124-
xshell = "0.2.5"

crates/base-db/Cargo.toml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,10 @@ rust-version.workspace = true
1212
doctest = false
1313

1414
[dependencies]
15-
rust-analyzer-salsa = "0.17.0-pre.3"
16-
rustc-hash = "1.1.0"
17-
18-
triomphe.workspace = true
19-
2015
la-arena.workspace = true
16+
rust-analyzer-salsa.workspace = true
17+
rustc-hash.workspace = true
18+
triomphe.workspace = true
2119

2220
# local deps
2321
cfg.workspace = true

crates/hir-ty/src/consteval.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//! Constant evaluation details
22
3-
use base_db::CrateId;
3+
use base_db::{salsa::Cycle, CrateId};
44
use chalk_ir::{cast::Cast, BoundVar, DebruijnIndex};
55
use hir_def::{
66
hir::Expr,
@@ -184,7 +184,7 @@ pub fn try_const_usize(db: &dyn HirDatabase, c: &Const) -> Option<u128> {
184184

185185
pub(crate) fn const_eval_recover(
186186
_: &dyn HirDatabase,
187-
_: &[String],
187+
_: &Cycle,
188188
_: &GeneralConstId,
189189
_: &Substitution,
190190
_: &Option<Arc<TraitEnvironment>>,
@@ -194,15 +194,15 @@ pub(crate) fn const_eval_recover(
194194

195195
pub(crate) fn const_eval_static_recover(
196196
_: &dyn HirDatabase,
197-
_: &[String],
197+
_: &Cycle,
198198
_: &StaticId,
199199
) -> Result<Const, ConstEvalError> {
200200
Err(ConstEvalError::MirLowerError(MirLowerError::Loop))
201201
}
202202

203203
pub(crate) fn const_eval_discriminant_recover(
204204
_: &dyn HirDatabase,
205-
_: &[String],
205+
_: &Cycle,
206206
_: &EnumVariantId,
207207
) -> Result<i128, ConstEvalError> {
208208
Err(ConstEvalError::MirLowerError(MirLowerError::Loop))

crates/hir-ty/src/layout.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
33
use std::fmt;
44

5+
use base_db::salsa::Cycle;
56
use chalk_ir::{AdtId, FloatTy, IntTy, TyKind, UintTy};
67
use hir_def::{
78
layout::{
@@ -431,7 +432,7 @@ pub fn layout_of_ty_query(
431432

432433
pub fn layout_of_ty_recover(
433434
_: &dyn HirDatabase,
434-
_: &[String],
435+
_: &Cycle,
435436
_: &Ty,
436437
_: &Arc<TraitEnvironment>,
437438
) -> Result<Arc<Layout>, LayoutError> {

crates/hir-ty/src/layout/adt.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
33
use std::{cmp, ops::Bound};
44

5+
use base_db::salsa::Cycle;
56
use hir_def::{
67
data::adt::VariantData,
78
layout::{Integer, LayoutCalculator, ReprOptions, TargetDataLayout},
@@ -140,7 +141,7 @@ fn layout_scalar_valid_range(db: &dyn HirDatabase, def: AdtId) -> (Bound<u128>,
140141

141142
pub fn layout_of_adt_recover(
142143
_: &dyn HirDatabase,
143-
_: &[String],
144+
_: &Cycle,
144145
_: &AdtId,
145146
_: &Substitution,
146147
_: &Arc<TraitEnvironment>,

crates/hir-ty/src/lower.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ use std::{
1010
iter,
1111
};
1212

13-
use base_db::CrateId;
13+
use base_db::{salsa::Cycle, CrateId};
1414
use chalk_ir::{
1515
cast::Cast, fold::Shift, fold::TypeFoldable, interner::HasInterner, Mutability, Safety,
1616
};
@@ -1454,7 +1454,7 @@ pub(crate) fn generic_predicates_for_param_query(
14541454

14551455
pub(crate) fn generic_predicates_for_param_recover(
14561456
_db: &dyn HirDatabase,
1457-
_cycle: &[String],
1457+
_cycle: &Cycle,
14581458
_def: &GenericDefId,
14591459
_param_id: &TypeOrConstParamId,
14601460
_assoc_name: &Option<Name>,
@@ -1637,7 +1637,7 @@ pub(crate) fn generic_defaults_query(
16371637

16381638
pub(crate) fn generic_defaults_recover(
16391639
db: &dyn HirDatabase,
1640-
_cycle: &[String],
1640+
_cycle: &Cycle,
16411641
def: &GenericDefId,
16421642
) -> Arc<[Binders<crate::GenericArg>]> {
16431643
let generic_params = generics(db.upcast(), *def);
@@ -1865,7 +1865,7 @@ pub(crate) fn ty_query(db: &dyn HirDatabase, def: TyDefId) -> Binders<Ty> {
18651865
}
18661866
}
18671867

1868-
pub(crate) fn ty_recover(db: &dyn HirDatabase, _cycle: &[String], def: &TyDefId) -> Binders<Ty> {
1868+
pub(crate) fn ty_recover(db: &dyn HirDatabase, _cycle: &Cycle, def: &TyDefId) -> Binders<Ty> {
18691869
let generics = match *def {
18701870
TyDefId::BuiltinType(_) => return Binders::empty(Interner, TyKind::Error.intern(Interner)),
18711871
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
19151915

19161916
pub(crate) fn impl_self_ty_recover(
19171917
db: &dyn HirDatabase,
1918-
_cycle: &[String],
1918+
_cycle: &Cycle,
19191919
impl_id: &ImplId,
19201920
) -> Binders<Ty> {
19211921
let generics = generics(db.upcast(), (*impl_id).into());

crates/hir-ty/src/mir/lower.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
33
use std::{fmt::Write, iter, mem};
44

5-
use base_db::FileId;
5+
use base_db::{salsa::Cycle, FileId};
66
use chalk_ir::{BoundVar, ConstData, DebruijnIndex, TyKind};
77
use hir_def::{
88
body::Body,
@@ -2110,7 +2110,7 @@ pub fn mir_body_query(db: &dyn HirDatabase, def: DefWithBodyId) -> Result<Arc<Mi
21102110

21112111
pub fn mir_body_recover(
21122112
_db: &dyn HirDatabase,
2113-
_cycle: &[String],
2113+
_cycle: &Cycle,
21142114
_def: &DefWithBodyId,
21152115
) -> Result<Arc<MirBody>> {
21162116
Err(MirLowerError::Loop)

crates/hir-ty/src/mir/monomorphization.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
1010
use std::mem;
1111

12+
use base_db::salsa::Cycle;
1213
use chalk_ir::{
1314
fold::{FallibleTypeFolder, TypeFoldable, TypeSuperFoldable},
1415
ConstData, DebruijnIndex,
@@ -300,7 +301,7 @@ pub fn monomorphized_mir_body_query(
300301

301302
pub fn monomorphized_mir_body_recover(
302303
_: &dyn HirDatabase,
303-
_: &[String],
304+
_: &Cycle,
304305
_: &DefWithBodyId,
305306
_: &Substitution,
306307
_: &Arc<crate::TraitEnvironment>,

0 commit comments

Comments
 (0)