diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2019-11-22 15:52:25 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2019-11-22 15:52:25 +0000 |
commit | 6d42db2e51e223c9be7b6ea234521ca6f93ee95a (patch) | |
tree | 895e5bb04a4a632b4069bf66f8c7770cfa80a90d /crates/ra_hir_def/src/db.rs | |
parent | b841c53a0c93cdca3f08b1c917c9fa8a63d31604 (diff) | |
parent | fe119fef2746bade402fb73dcba8cde49779654d (diff) |
Merge #2358
2358: Hide data from public API r=matklad a=matklad
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_hir_def/src/db.rs')
-rw-r--r-- | crates/ra_hir_def/src/db.rs | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/crates/ra_hir_def/src/db.rs b/crates/ra_hir_def/src/db.rs index 8c1784ec9..2c660ab88 100644 --- a/crates/ra_hir_def/src/db.rs +++ b/crates/ra_hir_def/src/db.rs | |||
@@ -8,14 +8,14 @@ use ra_syntax::ast; | |||
8 | use crate::{ | 8 | use crate::{ |
9 | adt::{EnumData, StructData}, | 9 | adt::{EnumData, StructData}, |
10 | body::{scope::ExprScopes, Body, BodySourceMap}, | 10 | body::{scope::ExprScopes, Body, BodySourceMap}, |
11 | data::{FunctionData, ImplData, TraitData, TypeAliasData}, | 11 | data::{ConstData, FunctionData, ImplData, TraitData, TypeAliasData}, |
12 | generics::GenericParams, | 12 | generics::GenericParams, |
13 | nameres::{ | 13 | nameres::{ |
14 | raw::{ImportSourceMap, RawItems}, | 14 | raw::{ImportSourceMap, RawItems}, |
15 | CrateDefMap, | 15 | CrateDefMap, |
16 | }, | 16 | }, |
17 | DefWithBodyId, EnumId, FunctionId, GenericDefId, ImplId, ItemLoc, StructOrUnionId, TraitId, | 17 | ConstId, DefWithBodyId, EnumId, FunctionId, GenericDefId, ImplId, ItemLoc, StaticId, |
18 | TypeAliasId, | 18 | StructOrUnionId, TraitId, TypeAliasId, |
19 | }; | 19 | }; |
20 | 20 | ||
21 | #[salsa::query_group(InternDatabaseStorage)] | 21 | #[salsa::query_group(InternDatabaseStorage)] |
@@ -70,6 +70,12 @@ pub trait DefDatabase2: InternDatabase + AstDatabase { | |||
70 | #[salsa::invoke(FunctionData::fn_data_query)] | 70 | #[salsa::invoke(FunctionData::fn_data_query)] |
71 | fn function_data(&self, func: FunctionId) -> Arc<FunctionData>; | 71 | fn function_data(&self, func: FunctionId) -> Arc<FunctionData>; |
72 | 72 | ||
73 | #[salsa::invoke(ConstData::const_data_query)] | ||
74 | fn const_data(&self, konst: ConstId) -> Arc<ConstData>; | ||
75 | |||
76 | #[salsa::invoke(ConstData::static_data_query)] | ||
77 | fn static_data(&self, konst: StaticId) -> Arc<ConstData>; | ||
78 | |||
73 | #[salsa::invoke(Body::body_with_source_map_query)] | 79 | #[salsa::invoke(Body::body_with_source_map_query)] |
74 | fn body_with_source_map(&self, def: DefWithBodyId) -> (Arc<Body>, Arc<BodySourceMap>); | 80 | fn body_with_source_map(&self, def: DefWithBodyId) -> (Arc<Body>, Arc<BodySourceMap>); |
75 | 81 | ||