From 16ab75a83aea49f906e83860bf97d268eca227c0 Mon Sep 17 00:00:00 2001 From: Florian Diebold Date: Sat, 7 Aug 2021 13:11:58 +0200 Subject: [PATCH] Upgrade Chalk --- Cargo.lock | 16 ++++++++-------- crates/hir_ty/Cargo.toml | 6 +++--- crates/hir_ty/src/traits.rs | 4 ++-- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index dccf8cf6df9..4d42c1c7be8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -162,9 +162,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "chalk-derive" -version = "0.69.0" +version = "0.70.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef492c0897139b578c495149fda9153ef074f91d07361603d70531b68e2a5c02" +checksum = "1b29a4ef88867aee29bc709976d9b0a20ddb2c52aeca0bd635893a74fa77d7f6" dependencies = [ "proc-macro2", "quote", @@ -174,9 +174,9 @@ dependencies = [ [[package]] name = "chalk-ir" -version = "0.69.0" +version = "0.70.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95066fe8bd77ad2dd53981b87a0b72385695e5caab56d69151873cb5df415b42" +checksum = "3efd5b260d23af3daebae111ea4066604dd3cdb18ca610358ab2e2a7aab71461" dependencies = [ "bitflags", "chalk-derive", @@ -185,9 +185,9 @@ dependencies = [ [[package]] name = "chalk-recursive" -version = "0.69.0" +version = "0.70.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ede3f73bba6510660b5c4fdab5a60a81396ecb0f38f9165fcdf80d62ba017800" +checksum = "7c8089c69051fa6bfdadb67f6dc951881f99fef6814e0e0c27c47218e34d8adb" dependencies = [ "chalk-derive", "chalk-ir", @@ -198,9 +198,9 @@ dependencies = [ [[package]] name = "chalk-solve" -version = "0.69.0" +version = "0.70.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9539e84bb8ac8960762794ae88e108d6c3e4b2f60d4241d461ddcf2ba8645e1" +checksum = "3ad0c276126d7787577d22f82785d8f2795318ad30349e66b487a6d6a591e351" dependencies = [ "chalk-derive", "chalk-ir", diff --git a/crates/hir_ty/Cargo.toml b/crates/hir_ty/Cargo.toml index 134a7892d61..304dbb1b99f 100644 --- a/crates/hir_ty/Cargo.toml +++ b/crates/hir_ty/Cargo.toml @@ -17,9 +17,9 @@ ena = "0.14.0" log = "0.4.8" rustc-hash = "1.1.0" scoped-tls = "1" -chalk-solve = { version = "0.69", default-features = false } -chalk-ir = "0.69" -chalk-recursive = { version = "0.69", default-features = false } +chalk-solve = { version = "0.70", default-features = false } +chalk-ir = "0.70" +chalk-recursive = { version = "0.70", default-features = false } la-arena = { version = "0.2.0", path = "../../lib/arena" } once_cell = { version = "1.5.0" } diff --git a/crates/hir_ty/src/traits.rs b/crates/hir_ty/src/traits.rs index f589b314b83..147c5b5e527 100644 --- a/crates/hir_ty/src/traits.rs +++ b/crates/hir_ty/src/traits.rs @@ -3,6 +3,7 @@ use std::env::var; use chalk_ir::GoalData; +use chalk_recursive::Cache; use chalk_solve::{logging_db::LoggingRustIrDatabase, Solver}; use base_db::CrateId; @@ -26,9 +27,8 @@ pub(crate) struct ChalkContext<'a> { fn create_chalk_solver() -> chalk_recursive::RecursiveSolver { let overflow_depth = var("CHALK_OVERFLOW_DEPTH").ok().and_then(|s| s.parse().ok()).unwrap_or(100); - let caching_enabled = true; let max_size = var("CHALK_SOLVER_MAX_SIZE").ok().and_then(|s| s.parse().ok()).unwrap_or(30); - chalk_recursive::RecursiveSolver::new(overflow_depth, max_size, caching_enabled) + chalk_recursive::RecursiveSolver::new(overflow_depth, max_size, Some(Cache::new())) } /// A set of clauses that we assume to be true. E.g. if we are inside this function: