Upgrade Chalk

This commit is contained in:
Florian Diebold 2021-08-07 13:11:58 +02:00
parent b8800fd85d
commit 16ab75a83a
3 changed files with 13 additions and 13 deletions

View file

@ -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<Interner> {
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: