diff options
author | Florian Diebold <[email protected]> | 2020-07-11 14:22:46 +0100 |
---|---|---|
committer | Florian Diebold <[email protected]> | 2020-07-12 18:58:34 +0100 |
commit | 209c492432c15b017f99dba06d5937389c1f9546 (patch) | |
tree | 45d30a421ff534c72ae850cd4ff108b74ef81f9d /crates/ra_hir_ty/src/traits.rs | |
parent | ab1ad19f552e1b11055ed60f87cc420871d902eb (diff) |
Upgrade Chalk
Diffstat (limited to 'crates/ra_hir_ty/src/traits.rs')
-rw-r--r-- | crates/ra_hir_ty/src/traits.rs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/crates/ra_hir_ty/src/traits.rs b/crates/ra_hir_ty/src/traits.rs index 2a6d7faef..786f758e9 100644 --- a/crates/ra_hir_ty/src/traits.rs +++ b/crates/ra_hir_ty/src/traits.rs | |||
@@ -2,6 +2,7 @@ | |||
2 | use std::sync::Arc; | 2 | use std::sync::Arc; |
3 | 3 | ||
4 | use chalk_ir::cast::Cast; | 4 | use chalk_ir::cast::Cast; |
5 | use chalk_solve::Solver; | ||
5 | use hir_def::{ | 6 | use hir_def::{ |
6 | expr::ExprId, lang_item::LangItemTarget, DefWithBodyId, ImplId, TraitId, TypeAliasId, | 7 | expr::ExprId, lang_item::LangItemTarget, DefWithBodyId, ImplId, TraitId, TypeAliasId, |
7 | }; | 8 | }; |
@@ -32,9 +33,10 @@ struct ChalkContext<'a> { | |||
32 | krate: CrateId, | 33 | krate: CrateId, |
33 | } | 34 | } |
34 | 35 | ||
35 | fn create_chalk_solver() -> chalk_solve::Solver<Interner> { | 36 | fn create_chalk_solver() -> chalk_recursive::RecursiveSolver<Interner> { |
36 | let solver_choice = chalk_solve::SolverChoice::recursive(); | 37 | let overflow_depth = 100; |
37 | solver_choice.into_solver() | 38 | let caching_enabled = true; |
39 | chalk_recursive::RecursiveSolver::new(overflow_depth, caching_enabled) | ||
38 | } | 40 | } |
39 | 41 | ||
40 | /// A set of clauses that we assume to be true. E.g. if we are inside this function: | 42 | /// A set of clauses that we assume to be true. E.g. if we are inside this function: |