aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/db.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir/src/db.rs')
-rw-r--r--crates/ra_hir/src/db.rs17
1 files changed, 7 insertions, 10 deletions
diff --git a/crates/ra_hir/src/db.rs b/crates/ra_hir/src/db.rs
index a5bfef91f..e192c8f47 100644
--- a/crates/ra_hir/src/db.rs
+++ b/crates/ra_hir/src/db.rs
@@ -2,18 +2,15 @@
2 2
3use std::sync::Arc; 3use std::sync::Arc;
4 4
5use hir_def::{GenericDefId, ImplId, LocalStructFieldId, TraitId, VariantId}; 5use hir_def::{DefWithBodyId, GenericDefId, ImplId, LocalStructFieldId, TraitId, VariantId};
6use ra_arena::map::ArenaMap; 6use ra_arena::map::ArenaMap;
7use ra_db::{salsa, CrateId}; 7use ra_db::{salsa, CrateId};
8 8
9use crate::{ 9use crate::ty::{
10 ty::{ 10 method_resolution::CrateImplBlocks,
11 method_resolution::CrateImplBlocks, 11 traits::{AssocTyValue, Impl},
12 traits::{AssocTyValue, Impl}, 12 CallableDef, FnSig, GenericPredicate, InferenceResult, Substs, Ty, TyDefId, TypeCtor,
13 CallableDef, FnSig, GenericPredicate, InferenceResult, Substs, Ty, TyDefId, TypeCtor, 13 ValueTyDefId,
14 ValueTyDefId,
15 },
16 DefWithBody,
17}; 14};
18 15
19pub use hir_def::db::{ 16pub use hir_def::db::{
@@ -32,7 +29,7 @@ pub use hir_expand::db::{
32#[salsa::requires(salsa::Database)] 29#[salsa::requires(salsa::Database)]
33pub trait HirDatabase: DefDatabase { 30pub trait HirDatabase: DefDatabase {
34 #[salsa::invoke(crate::ty::infer_query)] 31 #[salsa::invoke(crate::ty::infer_query)]
35 fn infer(&self, def: DefWithBody) -> Arc<InferenceResult>; 32 fn infer(&self, def: DefWithBodyId) -> Arc<InferenceResult>;
36 33
37 #[salsa::invoke(crate::ty::ty_query)] 34 #[salsa::invoke(crate::ty::ty_query)]
38 fn ty(&self, def: TyDefId) -> Ty; 35 fn ty(&self, def: TyDefId) -> Ty;