aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_analysis/src/hir/db.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_analysis/src/hir/db.rs')
-rw-r--r--crates/ra_analysis/src/hir/db.rs70
1 files changed, 0 insertions, 70 deletions
diff --git a/crates/ra_analysis/src/hir/db.rs b/crates/ra_analysis/src/hir/db.rs
deleted file mode 100644
index c8ae551c5..000000000
--- a/crates/ra_analysis/src/hir/db.rs
+++ /dev/null
@@ -1,70 +0,0 @@
1use std::sync::Arc;
2
3use ra_syntax::{
4 SyntaxNode,
5 ast::FnDefNode,
6};
7use ra_db::{SourceRootId, LocationIntener, SyntaxDatabase};
8
9use crate::{
10 FileId,
11 hir::{
12 DefLoc, DefId, FnId,
13 SourceFileItems, SourceItemId,
14 query_definitions,
15 function::{FnScopes},
16 module::{ModuleId, ModuleTree, ModuleSource,
17 nameres::{ItemMap, InputModuleItems}},
18 },
19 Cancelable,
20};
21
22salsa::query_group! {
23
24pub(crate) trait HirDatabase: SyntaxDatabase
25 + AsRef<LocationIntener<DefLoc, DefId>>
26 + AsRef<LocationIntener<SourceItemId, FnId>>
27{
28 fn fn_scopes(fn_id: FnId) -> Arc<FnScopes> {
29 type FnScopesQuery;
30 use fn query_definitions::fn_scopes;
31 }
32 fn fn_syntax(fn_id: FnId) -> FnDefNode {
33 type FnSyntaxQuery;
34 // Don't retain syntax trees in memory
35 storage dependencies;
36 use fn query_definitions::fn_syntax;
37 }
38
39 fn file_items(file_id: FileId) -> Arc<SourceFileItems> {
40 type SourceFileItemsQuery;
41 storage dependencies;
42 use fn query_definitions::file_items;
43 }
44
45 fn file_item(source_item_id: SourceItemId) -> SyntaxNode {
46 type FileItemQuery;
47 storage dependencies;
48 use fn query_definitions::file_item;
49 }
50
51 fn submodules(source: ModuleSource) -> Cancelable<Arc<Vec<crate::hir::module::imp::Submodule>>> {
52 type SubmodulesQuery;
53 use fn query_definitions::submodules;
54 }
55
56 fn input_module_items(source_root_id: SourceRootId, module_id: ModuleId) -> Cancelable<Arc<InputModuleItems>> {
57 type InputModuleItemsQuery;
58 use fn query_definitions::input_module_items;
59 }
60 fn item_map(source_root_id: SourceRootId) -> Cancelable<Arc<ItemMap>> {
61 type ItemMapQuery;
62 use fn query_definitions::item_map;
63 }
64 fn module_tree(source_root_id: SourceRootId) -> Cancelable<Arc<ModuleTree>> {
65 type ModuleTreeQuery;
66 use fn crate::hir::module::imp::module_tree;
67 }
68}
69
70}