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.rs9
1 files changed, 5 insertions, 4 deletions
diff --git a/crates/ra_hir/src/db.rs b/crates/ra_hir/src/db.rs
index 147005848..be8a8c98b 100644
--- a/crates/ra_hir/src/db.rs
+++ b/crates/ra_hir/src/db.rs
@@ -8,6 +8,7 @@ use crate::{
8 Function, FnSignature, ExprScopes, TypeAlias, 8 Function, FnSignature, ExprScopes, TypeAlias,
9 Struct, Enum, StructField, 9 Struct, Enum, StructField,
10 Const, ConstSignature, Static, 10 Const, ConstSignature, Static,
11 DefWithBody,
11 nameres::{Namespace, ImportSourceMap, RawItems, CrateDefMap}, 12 nameres::{Namespace, ImportSourceMap, RawItems, CrateDefMap},
12 ty::{InferenceResult, Ty, method_resolution::CrateImplBlocks, TypableDef, CallableDef, FnSig}, 13 ty::{InferenceResult, Ty, method_resolution::CrateImplBlocks, TypableDef, CallableDef, FnSig},
13 adt::{StructData, EnumData}, 14 adt::{StructData, EnumData},
@@ -83,10 +84,10 @@ pub trait DefDatabase: SourceDatabase + AsRef<HirInterner> {
83#[salsa::query_group(HirDatabaseStorage)] 84#[salsa::query_group(HirDatabaseStorage)]
84pub trait HirDatabase: DefDatabase { 85pub trait HirDatabase: DefDatabase {
85 #[salsa::invoke(ExprScopes::expr_scopes_query)] 86 #[salsa::invoke(ExprScopes::expr_scopes_query)]
86 fn expr_scopes(&self, func: Function) -> Arc<ExprScopes>; 87 fn expr_scopes(&self, def: DefWithBody) -> Arc<ExprScopes>;
87 88
88 #[salsa::invoke(crate::ty::infer)] 89 #[salsa::invoke(crate::ty::infer)]
89 fn infer(&self, func: Function) -> Arc<InferenceResult>; 90 fn infer(&self, def: DefWithBody) -> Arc<InferenceResult>;
90 91
91 #[salsa::invoke(crate::ty::type_for_def)] 92 #[salsa::invoke(crate::ty::type_for_def)]
92 fn type_for_def(&self, def: TypableDef, ns: Namespace) -> Ty; 93 fn type_for_def(&self, def: TypableDef, ns: Namespace) -> Ty;
@@ -100,11 +101,11 @@ pub trait HirDatabase: DefDatabase {
100 #[salsa::invoke(crate::expr::body_with_source_map_query)] 101 #[salsa::invoke(crate::expr::body_with_source_map_query)]
101 fn body_with_source_map( 102 fn body_with_source_map(
102 &self, 103 &self,
103 func: Function, 104 def: DefWithBody,
104 ) -> (Arc<crate::expr::Body>, Arc<crate::expr::BodySourceMap>); 105 ) -> (Arc<crate::expr::Body>, Arc<crate::expr::BodySourceMap>);
105 106
106 #[salsa::invoke(crate::expr::body_hir_query)] 107 #[salsa::invoke(crate::expr::body_hir_query)]
107 fn body_hir(&self, func: Function) -> Arc<crate::expr::Body>; 108 fn body_hir(&self, def: DefWithBody) -> Arc<crate::expr::Body>;
108 109
109 #[salsa::invoke(crate::ty::method_resolution::CrateImplBlocks::impls_in_crate_query)] 110 #[salsa::invoke(crate::ty::method_resolution::CrateImplBlocks::impls_in_crate_query)]
110 fn impls_in_crate(&self, krate: Crate) -> Arc<CrateImplBlocks>; 111 fn impls_in_crate(&self, krate: Crate) -> Arc<CrateImplBlocks>;