diff options
Diffstat (limited to 'crates/ra_hir/src/db.rs')
-rw-r--r-- | crates/ra_hir/src/db.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/crates/ra_hir/src/db.rs b/crates/ra_hir/src/db.rs index d3908f8ac..143919cdc 100644 --- a/crates/ra_hir/src/db.rs +++ b/crates/ra_hir/src/db.rs | |||
@@ -14,6 +14,7 @@ use crate::{ | |||
14 | impl_block::{ModuleImplBlocks, ImplSourceMap}, | 14 | impl_block::{ModuleImplBlocks, ImplSourceMap}, |
15 | generics::{GenericParams, GenericDef}, | 15 | generics::{GenericParams, GenericDef}, |
16 | type_ref::TypeRef, | 16 | type_ref::TypeRef, |
17 | traits::TraitData, Trait, ty::TraitRef | ||
17 | }; | 18 | }; |
18 | 19 | ||
19 | #[salsa::query_group(DefDatabaseStorage)] | 20 | #[salsa::query_group(DefDatabaseStorage)] |
@@ -27,6 +28,9 @@ pub trait DefDatabase: SourceDatabase + AsRef<HirInterner> { | |||
27 | #[salsa::invoke(crate::adt::EnumData::enum_data_query)] | 28 | #[salsa::invoke(crate::adt::EnumData::enum_data_query)] |
28 | fn enum_data(&self, e: Enum) -> Arc<EnumData>; | 29 | fn enum_data(&self, e: Enum) -> Arc<EnumData>; |
29 | 30 | ||
31 | #[salsa::invoke(crate::traits::TraitData::trait_data_query)] | ||
32 | fn trait_data(&self, t: Trait) -> Arc<TraitData>; | ||
33 | |||
30 | #[salsa::invoke(crate::ids::SourceFileItems::file_items_query)] | 34 | #[salsa::invoke(crate::ids::SourceFileItems::file_items_query)] |
31 | fn file_items(&self, file_id: HirFileId) -> Arc<SourceFileItems>; | 35 | fn file_items(&self, file_id: HirFileId) -> Arc<SourceFileItems>; |
32 | 36 | ||
@@ -98,6 +102,9 @@ pub trait HirDatabase: DefDatabase { | |||
98 | 102 | ||
99 | #[salsa::invoke(crate::ty::method_resolution::CrateImplBlocks::impls_in_crate_query)] | 103 | #[salsa::invoke(crate::ty::method_resolution::CrateImplBlocks::impls_in_crate_query)] |
100 | fn impls_in_crate(&self, krate: Crate) -> Arc<CrateImplBlocks>; | 104 | fn impls_in_crate(&self, krate: Crate) -> Arc<CrateImplBlocks>; |
105 | |||
106 | #[salsa::invoke(crate::ty::method_resolution::implements)] | ||
107 | fn implements(&self, trait_ref: TraitRef) -> bool; | ||
101 | } | 108 | } |
102 | 109 | ||
103 | #[test] | 110 | #[test] |