diff options
Diffstat (limited to 'crates/ra_hir/src/db.rs')
-rw-r--r-- | crates/ra_hir/src/db.rs | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/crates/ra_hir/src/db.rs b/crates/ra_hir/src/db.rs index 0898daa3c..97de7da31 100644 --- a/crates/ra_hir/src/db.rs +++ b/crates/ra_hir/src/db.rs | |||
@@ -7,14 +7,14 @@ use crate::{ | |||
7 | DefId, MacroCallId, Name, HirFileId, | 7 | DefId, MacroCallId, Name, HirFileId, |
8 | SourceFileItems, SourceItemId, Crate, Module, HirInterner, | 8 | SourceFileItems, SourceItemId, Crate, Module, HirInterner, |
9 | query_definitions, | 9 | query_definitions, |
10 | FnSignature, FnScopes, | 10 | Function, FnSignature, FnScopes, |
11 | macros::MacroExpansion, | 11 | macros::MacroExpansion, |
12 | module_tree::ModuleTree, | 12 | module_tree::ModuleTree, |
13 | nameres::{ItemMap, lower::{LoweredModule, ImportSourceMap}}, | 13 | nameres::{ItemMap, lower::{LoweredModule, ImportSourceMap}}, |
14 | ty::{InferenceResult, Ty, method_resolution::CrateImplBlocks}, | 14 | ty::{InferenceResult, Ty, method_resolution::CrateImplBlocks, TypableDef}, |
15 | adt::{StructData, EnumData, EnumVariantData}, | 15 | adt::{StructData, EnumData, EnumVariantData}, |
16 | impl_block::ModuleImplBlocks, | 16 | impl_block::ModuleImplBlocks, |
17 | generics::GenericParams, | 17 | generics::{GenericParams, GenericDef}, |
18 | }; | 18 | }; |
19 | 19 | ||
20 | #[salsa::query_group] | 20 | #[salsa::query_group] |
@@ -26,7 +26,7 @@ pub trait HirDatabase: SyntaxDatabase + AsRef<HirInterner> { | |||
26 | fn expand_macro_invocation(&self, invoc: MacroCallId) -> Option<Arc<MacroExpansion>>; | 26 | fn expand_macro_invocation(&self, invoc: MacroCallId) -> Option<Arc<MacroExpansion>>; |
27 | 27 | ||
28 | #[salsa::invoke(query_definitions::fn_scopes)] | 28 | #[salsa::invoke(query_definitions::fn_scopes)] |
29 | fn fn_scopes(&self, def_id: DefId) -> Arc<FnScopes>; | 29 | fn fn_scopes(&self, func: Function) -> Arc<FnScopes>; |
30 | 30 | ||
31 | #[salsa::invoke(crate::adt::StructData::struct_data_query)] | 31 | #[salsa::invoke(crate::adt::StructData::struct_data_query)] |
32 | fn struct_data(&self, def_id: DefId) -> Arc<StructData>; | 32 | fn struct_data(&self, def_id: DefId) -> Arc<StructData>; |
@@ -38,10 +38,10 @@ pub trait HirDatabase: SyntaxDatabase + AsRef<HirInterner> { | |||
38 | fn enum_variant_data(&self, def_id: DefId) -> Arc<EnumVariantData>; | 38 | fn enum_variant_data(&self, def_id: DefId) -> Arc<EnumVariantData>; |
39 | 39 | ||
40 | #[salsa::invoke(crate::ty::infer)] | 40 | #[salsa::invoke(crate::ty::infer)] |
41 | fn infer(&self, def_id: DefId) -> Arc<InferenceResult>; | 41 | fn infer(&self, func: Function) -> Arc<InferenceResult>; |
42 | 42 | ||
43 | #[salsa::invoke(crate::ty::type_for_def)] | 43 | #[salsa::invoke(crate::ty::type_for_def)] |
44 | fn type_for_def(&self, def_id: DefId) -> Ty; | 44 | fn type_for_def(&self, def: TypableDef) -> Ty; |
45 | 45 | ||
46 | #[salsa::invoke(crate::ty::type_for_field)] | 46 | #[salsa::invoke(crate::ty::type_for_field)] |
47 | fn type_for_field(&self, def_id: DefId, field: Name) -> Option<Ty>; | 47 | fn type_for_field(&self, def_id: DefId, field: Name) -> Option<Ty>; |
@@ -77,14 +77,14 @@ pub trait HirDatabase: SyntaxDatabase + AsRef<HirInterner> { | |||
77 | fn impls_in_crate(&self, krate: Crate) -> Arc<CrateImplBlocks>; | 77 | fn impls_in_crate(&self, krate: Crate) -> Arc<CrateImplBlocks>; |
78 | 78 | ||
79 | #[salsa::invoke(crate::expr::body_hir)] | 79 | #[salsa::invoke(crate::expr::body_hir)] |
80 | fn body_hir(&self, def_id: DefId) -> Arc<crate::expr::Body>; | 80 | fn body_hir(&self, func: Function) -> Arc<crate::expr::Body>; |
81 | 81 | ||
82 | #[salsa::invoke(crate::expr::body_syntax_mapping)] | 82 | #[salsa::invoke(crate::expr::body_syntax_mapping)] |
83 | fn body_syntax_mapping(&self, def_id: DefId) -> Arc<crate::expr::BodySyntaxMapping>; | 83 | fn body_syntax_mapping(&self, func: Function) -> Arc<crate::expr::BodySyntaxMapping>; |
84 | 84 | ||
85 | #[salsa::invoke(crate::generics::GenericParams::generic_params_query)] | 85 | #[salsa::invoke(crate::generics::GenericParams::generic_params_query)] |
86 | fn generic_params(&self, def_id: DefId) -> Arc<GenericParams>; | 86 | fn generic_params(&self, def: GenericDef) -> Arc<GenericParams>; |
87 | 87 | ||
88 | #[salsa::invoke(crate::FnSignature::fn_signature_query)] | 88 | #[salsa::invoke(crate::FnSignature::fn_signature_query)] |
89 | fn fn_signature(&self, def_id: DefId) -> Arc<FnSignature>; | 89 | fn fn_signature(&self, func: Function) -> Arc<FnSignature>; |
90 | } | 90 | } |