aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir')
-rw-r--r--crates/ra_hir/Cargo.toml2
-rw-r--r--crates/ra_hir/src/db.rs6
-rw-r--r--crates/ra_hir/src/ty/traits.rs6
3 files changed, 7 insertions, 7 deletions
diff --git a/crates/ra_hir/Cargo.toml b/crates/ra_hir/Cargo.toml
index 68ffcb2e9..cb4a8c3e3 100644
--- a/crates/ra_hir/Cargo.toml
+++ b/crates/ra_hir/Cargo.toml
@@ -27,4 +27,4 @@ chalk-ir = { git = "https://github.com/rust-lang/chalk.git" }
27 27
28[dev-dependencies] 28[dev-dependencies]
29flexi_logger = "0.11.0" 29flexi_logger = "0.11.0"
30insta = "0.7.0" 30insta = "0.8.1"
diff --git a/crates/ra_hir/src/db.rs b/crates/ra_hir/src/db.rs
index bda02d3cc..da62db58a 100644
--- a/crates/ra_hir/src/db.rs
+++ b/crates/ra_hir/src/db.rs
@@ -156,7 +156,7 @@ pub trait HirDatabase: DefDatabase {
156 #[salsa::invoke(crate::ty::method_resolution::CrateImplBlocks::impls_in_crate_query)] 156 #[salsa::invoke(crate::ty::method_resolution::CrateImplBlocks::impls_in_crate_query)]
157 fn impls_in_crate(&self, krate: Crate) -> Arc<CrateImplBlocks>; 157 fn impls_in_crate(&self, krate: Crate) -> Arc<CrateImplBlocks>;
158 158
159 #[salsa::invoke(crate::ty::traits::impls_for_trait)] 159 #[salsa::invoke(crate::ty::traits::impls_for_trait_query)]
160 fn impls_for_trait(&self, krate: Crate, trait_: Trait) -> Arc<[ImplBlock]>; 160 fn impls_for_trait(&self, krate: Crate, trait_: Trait) -> Arc<[ImplBlock]>;
161 161
162 /// This provides the Chalk trait solver instance. Because Chalk always 162 /// This provides the Chalk trait solver instance. Because Chalk always
@@ -164,11 +164,11 @@ pub trait HirDatabase: DefDatabase {
164 /// because Chalk does its own internal caching, the solver is wrapped in a 164 /// because Chalk does its own internal caching, the solver is wrapped in a
165 /// Mutex and the query is marked volatile, to make sure the cached state is 165 /// Mutex and the query is marked volatile, to make sure the cached state is
166 /// thrown away when input facts change. 166 /// thrown away when input facts change.
167 #[salsa::invoke(crate::ty::traits::solver)] 167 #[salsa::invoke(crate::ty::traits::solver_query)]
168 #[salsa::volatile] 168 #[salsa::volatile]
169 fn solver(&self, krate: Crate) -> Arc<Mutex<crate::ty::traits::Solver>>; 169 fn solver(&self, krate: Crate) -> Arc<Mutex<crate::ty::traits::Solver>>;
170 170
171 #[salsa::invoke(crate::ty::traits::implements)] 171 #[salsa::invoke(crate::ty::traits::implements_query)]
172 fn implements( 172 fn implements(
173 &self, 173 &self,
174 krate: Crate, 174 krate: Crate,
diff --git a/crates/ra_hir/src/ty/traits.rs b/crates/ra_hir/src/ty/traits.rs
index 7de04c044..190d018ff 100644
--- a/crates/ra_hir/src/ty/traits.rs
+++ b/crates/ra_hir/src/ty/traits.rs
@@ -25,7 +25,7 @@ struct ChalkContext<'a, DB> {
25 krate: Crate, 25 krate: Crate,
26} 26}
27 27
28pub(crate) fn solver(_db: &impl HirDatabase, _krate: Crate) -> Arc<Mutex<Solver>> { 28pub(crate) fn solver_query(_db: &impl HirDatabase, _krate: Crate) -> Arc<Mutex<Solver>> {
29 // krate parameter is just so we cache a unique solver per crate 29 // krate parameter is just so we cache a unique solver per crate
30 let solver_choice = chalk_solve::SolverChoice::SLG { max_size: CHALK_SOLVER_MAX_SIZE }; 30 let solver_choice = chalk_solve::SolverChoice::SLG { max_size: CHALK_SOLVER_MAX_SIZE };
31 debug!("Creating new solver for crate {:?}", _krate); 31 debug!("Creating new solver for crate {:?}", _krate);
@@ -33,7 +33,7 @@ pub(crate) fn solver(_db: &impl HirDatabase, _krate: Crate) -> Arc<Mutex<Solver>
33} 33}
34 34
35/// Collects impls for the given trait in the whole dependency tree of `krate`. 35/// Collects impls for the given trait in the whole dependency tree of `krate`.
36pub(crate) fn impls_for_trait( 36pub(crate) fn impls_for_trait_query(
37 db: &impl HirDatabase, 37 db: &impl HirDatabase,
38 krate: Crate, 38 krate: Crate,
39 trait_: Trait, 39 trait_: Trait,
@@ -76,7 +76,7 @@ pub enum Obligation {
76} 76}
77 77
78/// Check using Chalk whether trait is implemented for given parameters including `Self` type. 78/// Check using Chalk whether trait is implemented for given parameters including `Self` type.
79pub(crate) fn implements( 79pub(crate) fn implements_query(
80 db: &impl HirDatabase, 80 db: &impl HirDatabase,
81 krate: Crate, 81 krate: Crate,
82 trait_ref: Canonical<TraitRef>, 82 trait_ref: Canonical<TraitRef>,