diff options
author | Florian Diebold <[email protected]> | 2019-05-01 16:13:33 +0100 |
---|---|---|
committer | Florian Diebold <[email protected]> | 2019-05-04 17:18:30 +0100 |
commit | ef77d8375130d12678d4b2316cc1708c90349dad (patch) | |
tree | 37f495100cfcb5a8ce9e0bae8ed4fc50e3b49d80 /crates/ra_hir/src/db.rs | |
parent | c8a643f090ed88289c7bc17b48078e39b932c8a4 (diff) |
Document the peculiarity of the solver query a bit
Also remove the only remaining mention of chalk outside of the ty::traits
module.
Diffstat (limited to 'crates/ra_hir/src/db.rs')
-rw-r--r-- | crates/ra_hir/src/db.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/crates/ra_hir/src/db.rs b/crates/ra_hir/src/db.rs index b2c4fccf2..8aaf0375a 100644 --- a/crates/ra_hir/src/db.rs +++ b/crates/ra_hir/src/db.rs | |||
@@ -153,9 +153,14 @@ pub trait HirDatabase: DefDatabase { | |||
153 | #[salsa::invoke(crate::ty::traits::impls_for_trait)] | 153 | #[salsa::invoke(crate::ty::traits::impls_for_trait)] |
154 | fn impls_for_trait(&self, krate: Crate, trait_: Trait) -> Arc<[ImplBlock]>; | 154 | fn impls_for_trait(&self, krate: Crate, trait_: Trait) -> Arc<[ImplBlock]>; |
155 | 155 | ||
156 | /// This provides the Chalk trait solver instance. Because Chalk always | ||
157 | /// works from a specific crate, this query is keyed on the crate; and | ||
158 | /// because Chalk does its own internal caching, the solver is wrapped in a | ||
159 | /// Mutex and the query is marked volatile, to make sure the cached state is | ||
160 | /// thrown away when input facts change. | ||
156 | #[salsa::invoke(crate::ty::traits::solver)] | 161 | #[salsa::invoke(crate::ty::traits::solver)] |
157 | #[salsa::volatile] | 162 | #[salsa::volatile] |
158 | fn chalk_solver(&self, krate: Crate) -> Arc<Mutex<chalk_solve::Solver>>; | 163 | fn solver(&self, krate: Crate) -> Arc<Mutex<crate::ty::traits::Solver>>; |
159 | } | 164 | } |
160 | 165 | ||
161 | #[test] | 166 | #[test] |