mirror of
https://github.com/astral-sh/ruff.git
synced 2025-11-19 12:16:43 +00:00
[ty] Update salsa (#21281)
This commit is contained in:
parent
cddc0fedc2
commit
76127e5fb5
4 changed files with 17 additions and 21 deletions
6
Cargo.lock
generated
6
Cargo.lock
generated
|
|
@ -3586,7 +3586,7 @@ checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f"
|
|||
[[package]]
|
||||
name = "salsa"
|
||||
version = "0.24.0"
|
||||
source = "git+https://github.com/salsa-rs/salsa.git?rev=664750a6e588ed23a0d2d9105a02cb5993c8e178#664750a6e588ed23a0d2d9105a02cb5993c8e178"
|
||||
source = "git+https://github.com/salsa-rs/salsa.git?rev=05a9af7f554b64b8aadc2eeb6f2caf73d0408d09#05a9af7f554b64b8aadc2eeb6f2caf73d0408d09"
|
||||
dependencies = [
|
||||
"boxcar",
|
||||
"compact_str",
|
||||
|
|
@ -3610,12 +3610,12 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "salsa-macro-rules"
|
||||
version = "0.24.0"
|
||||
source = "git+https://github.com/salsa-rs/salsa.git?rev=664750a6e588ed23a0d2d9105a02cb5993c8e178#664750a6e588ed23a0d2d9105a02cb5993c8e178"
|
||||
source = "git+https://github.com/salsa-rs/salsa.git?rev=05a9af7f554b64b8aadc2eeb6f2caf73d0408d09#05a9af7f554b64b8aadc2eeb6f2caf73d0408d09"
|
||||
|
||||
[[package]]
|
||||
name = "salsa-macros"
|
||||
version = "0.24.0"
|
||||
source = "git+https://github.com/salsa-rs/salsa.git?rev=664750a6e588ed23a0d2d9105a02cb5993c8e178#664750a6e588ed23a0d2d9105a02cb5993c8e178"
|
||||
source = "git+https://github.com/salsa-rs/salsa.git?rev=05a9af7f554b64b8aadc2eeb6f2caf73d0408d09#05a9af7f554b64b8aadc2eeb6f2caf73d0408d09"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
|
|
|
|||
|
|
@ -146,7 +146,7 @@ regex-automata = { version = "0.4.9" }
|
|||
rustc-hash = { version = "2.0.0" }
|
||||
rustc-stable-hash = { version = "0.1.2" }
|
||||
# When updating salsa, make sure to also update the revision in `fuzz/Cargo.toml`
|
||||
salsa = { git = "https://github.com/salsa-rs/salsa.git", rev = "664750a6e588ed23a0d2d9105a02cb5993c8e178", default-features = false, features = [
|
||||
salsa = { git = "https://github.com/salsa-rs/salsa.git", rev = "05a9af7f554b64b8aadc2eeb6f2caf73d0408d09", default-features = false, features = [
|
||||
"compact_str",
|
||||
"macros",
|
||||
"salsa_unstable",
|
||||
|
|
|
|||
|
|
@ -114,17 +114,15 @@ pub(crate) fn infer_definition_types<'db>(
|
|||
fn definition_cycle_recover<'db>(
|
||||
db: &'db dyn Db,
|
||||
_id: salsa::Id,
|
||||
_last_provisional_value: &DefinitionInference<'db>,
|
||||
_value: &DefinitionInference<'db>,
|
||||
last_provisional_value: &DefinitionInference<'db>,
|
||||
value: DefinitionInference<'db>,
|
||||
count: u32,
|
||||
definition: Definition<'db>,
|
||||
) -> salsa::CycleRecoveryAction<DefinitionInference<'db>> {
|
||||
if count == ITERATIONS_BEFORE_FALLBACK {
|
||||
salsa::CycleRecoveryAction::Fallback(DefinitionInference::cycle_fallback(
|
||||
definition.scope(db),
|
||||
))
|
||||
) -> DefinitionInference<'db> {
|
||||
if &value == last_provisional_value || count != ITERATIONS_BEFORE_FALLBACK {
|
||||
value
|
||||
} else {
|
||||
salsa::CycleRecoveryAction::Iterate
|
||||
DefinitionInference::cycle_fallback(definition.scope(db))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -230,17 +228,15 @@ pub(crate) fn infer_isolated_expression<'db>(
|
|||
fn expression_cycle_recover<'db>(
|
||||
db: &'db dyn Db,
|
||||
_id: salsa::Id,
|
||||
_last_provisional_value: &ExpressionInference<'db>,
|
||||
_value: &ExpressionInference<'db>,
|
||||
last_provisional_value: &ExpressionInference<'db>,
|
||||
value: ExpressionInference<'db>,
|
||||
count: u32,
|
||||
input: InferExpression<'db>,
|
||||
) -> salsa::CycleRecoveryAction<ExpressionInference<'db>> {
|
||||
if count == ITERATIONS_BEFORE_FALLBACK {
|
||||
salsa::CycleRecoveryAction::Fallback(ExpressionInference::cycle_fallback(
|
||||
input.expression(db).scope(db),
|
||||
))
|
||||
) -> ExpressionInference<'db> {
|
||||
if &value == last_provisional_value || count != ITERATIONS_BEFORE_FALLBACK {
|
||||
value
|
||||
} else {
|
||||
salsa::CycleRecoveryAction::Iterate
|
||||
ExpressionInference::cycle_fallback(input.expression(db).scope(db))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ ty_python_semantic = { path = "../crates/ty_python_semantic" }
|
|||
ty_vendored = { path = "../crates/ty_vendored" }
|
||||
|
||||
libfuzzer-sys = { git = "https://github.com/rust-fuzz/libfuzzer", default-features = false }
|
||||
salsa = { git = "https://github.com/salsa-rs/salsa.git", rev = "664750a6e588ed23a0d2d9105a02cb5993c8e178", default-features = false, features = [
|
||||
salsa = { git = "https://github.com/salsa-rs/salsa.git", rev = "05a9af7f554b64b8aadc2eeb6f2caf73d0408d09", default-features = false, features = [
|
||||
"compact_str",
|
||||
"macros",
|
||||
"salsa_unstable",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue