aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/ty/traits.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir/src/ty/traits.rs')
-rw-r--r--crates/ra_hir/src/ty/traits.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/crates/ra_hir/src/ty/traits.rs b/crates/ra_hir/src/ty/traits.rs
index 637e21e9c..39b489a4c 100644
--- a/crates/ra_hir/src/ty/traits.rs
+++ b/crates/ra_hir/src/ty/traits.rs
@@ -8,7 +8,7 @@ use ra_db::{impl_intern_key, salsa, CrateId};
8use ra_prof::profile; 8use ra_prof::profile;
9use rustc_hash::FxHashSet; 9use rustc_hash::FxHashSet;
10 10
11use crate::{db::HirDatabase, Crate, ImplBlock, TypeAlias}; 11use crate::{db::HirDatabase, ImplBlock, TypeAlias};
12 12
13use super::{Canonical, GenericPredicate, HirDisplay, ProjectionTy, TraitRef, Ty, TypeWalk}; 13use super::{Canonical, GenericPredicate, HirDisplay, ProjectionTy, TraitRef, Ty, TypeWalk};
14 14
@@ -18,7 +18,7 @@ pub(crate) mod chalk;
18 18
19#[derive(Debug, Clone)] 19#[derive(Debug, Clone)]
20pub struct TraitSolver { 20pub struct TraitSolver {
21 krate: Crate, 21 krate: CrateId,
22 inner: Arc<Mutex<chalk_solve::Solver<ChalkIr>>>, 22 inner: Arc<Mutex<chalk_solve::Solver<ChalkIr>>>,
23} 23}
24 24
@@ -60,12 +60,12 @@ const CHALK_SOLVER_MAX_SIZE: usize = 4;
60#[derive(Debug, Copy, Clone)] 60#[derive(Debug, Copy, Clone)]
61struct ChalkContext<'a, DB> { 61struct ChalkContext<'a, DB> {
62 db: &'a DB, 62 db: &'a DB,
63 krate: Crate, 63 krate: CrateId,
64} 64}
65 65
66pub(crate) fn trait_solver_query( 66pub(crate) fn trait_solver_query(
67 db: &(impl HirDatabase + salsa::Database), 67 db: &(impl HirDatabase + salsa::Database),
68 krate: Crate, 68 krate: CrateId,
69) -> TraitSolver { 69) -> TraitSolver {
70 db.salsa_runtime().report_untracked_read(); 70 db.salsa_runtime().report_untracked_read();
71 // krate parameter is just so we cache a unique solver per crate 71 // krate parameter is just so we cache a unique solver per crate
@@ -176,7 +176,7 @@ impl TypeWalk for ProjectionPredicate {
176/// Solve a trait goal using Chalk. 176/// Solve a trait goal using Chalk.
177pub(crate) fn trait_solve_query( 177pub(crate) fn trait_solve_query(
178 db: &impl HirDatabase, 178 db: &impl HirDatabase,
179 krate: Crate, 179 krate: CrateId,
180 goal: Canonical<InEnvironment<Obligation>>, 180 goal: Canonical<InEnvironment<Obligation>>,
181) -> Option<Solution> { 181) -> Option<Solution> {
182 let _p = profile("trait_solve_query"); 182 let _p = profile("trait_solve_query");