diff options
author | Seivan Heidari <[email protected]> | 2019-11-14 22:20:27 +0000 |
---|---|---|
committer | Seivan Heidari <[email protected]> | 2019-11-14 22:20:27 +0000 |
commit | c622413bc72ea56d5f62a16788d897cb61eca948 (patch) | |
tree | 9de3dbe8b5c935ed168efac4e70770e54fbe0714 /crates/ra_hir_def/src/db.rs | |
parent | 0525778a3ad590492b51cc11085d815f9bb8f92b (diff) | |
parent | bbb022d3999b3038549ec6c309efb065231c896a (diff) |
Merge branch 'master' of https://github.com/rust-analyzer/rust-analyzer into feature/themes
Diffstat (limited to 'crates/ra_hir_def/src/db.rs')
-rw-r--r-- | crates/ra_hir_def/src/db.rs | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/crates/ra_hir_def/src/db.rs b/crates/ra_hir_def/src/db.rs index 29cf71a59..40b5920d9 100644 --- a/crates/ra_hir_def/src/db.rs +++ b/crates/ra_hir_def/src/db.rs | |||
@@ -7,11 +7,12 @@ use ra_syntax::ast; | |||
7 | 7 | ||
8 | use crate::{ | 8 | use crate::{ |
9 | adt::{EnumData, StructData}, | 9 | adt::{EnumData, StructData}, |
10 | body::{scope::ExprScopes, Body, BodySourceMap}, | ||
10 | nameres::{ | 11 | nameres::{ |
11 | raw::{ImportSourceMap, RawItems}, | 12 | raw::{ImportSourceMap, RawItems}, |
12 | CrateDefMap, | 13 | CrateDefMap, |
13 | }, | 14 | }, |
14 | EnumId, StructOrUnionId, | 15 | DefWithBodyId, EnumId, StructOrUnionId, |
15 | }; | 16 | }; |
16 | 17 | ||
17 | #[salsa::query_group(InternDatabaseStorage)] | 18 | #[salsa::query_group(InternDatabaseStorage)] |
@@ -52,4 +53,13 @@ pub trait DefDatabase2: InternDatabase + AstDatabase { | |||
52 | 53 | ||
53 | #[salsa::invoke(EnumData::enum_data_query)] | 54 | #[salsa::invoke(EnumData::enum_data_query)] |
54 | fn enum_data(&self, e: EnumId) -> Arc<EnumData>; | 55 | fn enum_data(&self, e: EnumId) -> Arc<EnumData>; |
56 | |||
57 | #[salsa::invoke(Body::body_with_source_map_query)] | ||
58 | fn body_with_source_map(&self, def: DefWithBodyId) -> (Arc<Body>, Arc<BodySourceMap>); | ||
59 | |||
60 | #[salsa::invoke(Body::body_query)] | ||
61 | fn body(&self, def: DefWithBodyId) -> Arc<Body>; | ||
62 | |||
63 | #[salsa::invoke(ExprScopes::expr_scopes_query)] | ||
64 | fn expr_scopes(&self, def: DefWithBodyId) -> Arc<ExprScopes>; | ||
55 | } | 65 | } |