diff options
author | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-01-06 13:45:22 +0000 |
---|---|---|
committer | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-01-06 13:45:22 +0000 |
commit | eaf553dade9a28b41631387d7c88b09fd0ba64e2 (patch) | |
tree | f5043da62c6cf4e2f082f68746843de7dfe53d03 /crates/ra_hir/src/db.rs | |
parent | cbac31cbdb2168b18fc6fb89f5cf069238cc6ccb (diff) | |
parent | 98957f4e6f66469310072dff5dfc3e521a7cd555 (diff) |
Merge #441
441: hir::Expr r=matklad a=flodiebold
Still a bit to do, but I already adapted `FnScopes` and thought I'd get feedback already.
Co-authored-by: Florian Diebold <[email protected]>
Diffstat (limited to 'crates/ra_hir/src/db.rs')
-rw-r--r-- | crates/ra_hir/src/db.rs | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/crates/ra_hir/src/db.rs b/crates/ra_hir/src/db.rs index 58296fc6f..96a3c60b9 100644 --- a/crates/ra_hir/src/db.rs +++ b/crates/ra_hir/src/db.rs | |||
@@ -7,7 +7,7 @@ use crate::{ | |||
7 | DefLoc, DefId, MacroCallLoc, MacroCallId, Name, HirFileId, | 7 | DefLoc, DefId, MacroCallLoc, MacroCallId, Name, HirFileId, |
8 | SourceFileItems, SourceItemId, | 8 | SourceFileItems, SourceItemId, |
9 | query_definitions, | 9 | query_definitions, |
10 | FnScopes, | 10 | FnSignature, FnScopes, |
11 | macros::MacroExpansion, | 11 | macros::MacroExpansion, |
12 | module::{ModuleId, ModuleTree, ModuleSource, | 12 | module::{ModuleId, ModuleTree, ModuleSource, |
13 | nameres::{ItemMap, InputModuleItems}}, | 13 | nameres::{ItemMap, InputModuleItems}}, |
@@ -31,7 +31,7 @@ pub trait HirDatabase: SyntaxDatabase | |||
31 | use fn crate::macros::expand_macro_invocation; | 31 | use fn crate::macros::expand_macro_invocation; |
32 | } | 32 | } |
33 | 33 | ||
34 | fn fn_scopes(def_id: DefId) -> Arc<FnScopes> { | 34 | fn fn_scopes(def_id: DefId) -> Cancelable<Arc<FnScopes>> { |
35 | type FnScopesQuery; | 35 | type FnScopesQuery; |
36 | use fn query_definitions::fn_scopes; | 36 | use fn query_definitions::fn_scopes; |
37 | } | 37 | } |
@@ -93,6 +93,21 @@ pub trait HirDatabase: SyntaxDatabase | |||
93 | type ImplsInModuleQuery; | 93 | type ImplsInModuleQuery; |
94 | use fn crate::impl_block::impls_in_module; | 94 | use fn crate::impl_block::impls_in_module; |
95 | } | 95 | } |
96 | |||
97 | fn body_hir(def_id: DefId) -> Cancelable<Arc<crate::expr::Body>> { | ||
98 | type BodyHirQuery; | ||
99 | use fn crate::expr::body_hir; | ||
100 | } | ||
101 | |||
102 | fn body_syntax_mapping(def_id: DefId) -> Cancelable<Arc<crate::expr::BodySyntaxMapping>> { | ||
103 | type BodySyntaxMappingQuery; | ||
104 | use fn crate::expr::body_syntax_mapping; | ||
105 | } | ||
106 | |||
107 | fn fn_signature(def_id: DefId) -> Arc<FnSignature> { | ||
108 | type FnSignatureQuery; | ||
109 | use fn crate::function::fn_signature; | ||
110 | } | ||
96 | } | 111 | } |
97 | 112 | ||
98 | } | 113 | } |