aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/db.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir/src/db.rs')
-rw-r--r--crates/ra_hir/src/db.rs10
1 files changed, 7 insertions, 3 deletions
diff --git a/crates/ra_hir/src/db.rs b/crates/ra_hir/src/db.rs
index 289bec507..1da3fc1c1 100644
--- a/crates/ra_hir/src/db.rs
+++ b/crates/ra_hir/src/db.rs
@@ -1,10 +1,10 @@
1use std::sync::Arc; 1use std::sync::Arc;
2 2
3use ra_syntax::SyntaxNode; 3use ra_syntax::{SyntaxNode, SourceFileNode};
4use ra_db::{SourceRootId, LocationIntener, SyntaxDatabase, FileId, Cancelable}; 4use ra_db::{SourceRootId, LocationIntener, SyntaxDatabase, FileId, Cancelable};
5 5
6use crate::{ 6use crate::{
7 DefLoc, DefId, Name, 7 DefLoc, DefId, Name, MFileId,
8 SourceFileItems, SourceItemId, 8 SourceFileItems, SourceItemId,
9 query_definitions, 9 query_definitions,
10 FnScopes, 10 FnScopes,
@@ -21,6 +21,10 @@ pub trait HirDatabase: SyntaxDatabase
21 + AsRef<LocationIntener<DefLoc, DefId>> 21 + AsRef<LocationIntener<DefLoc, DefId>>
22 + AsRef<LocationIntener<MacroCallLoc, MacroCallId>> 22 + AsRef<LocationIntener<MacroCallLoc, MacroCallId>>
23{ 23{
24 fn m_source_file(mfile_id: MFileId) -> SourceFileNode {
25 type MSourceFileQuery;
26 use fn crate::query_definitions::m_source_file;
27 }
24 fn expand_macro_invocation(invoc: MacroCallId) -> Option<Arc<MacroExpansion>> { 28 fn expand_macro_invocation(invoc: MacroCallId) -> Option<Arc<MacroExpansion>> {
25 type ExpandMacroCallQuery; 29 type ExpandMacroCallQuery;
26 use fn crate::macros::expand_macro_invocation; 30 use fn crate::macros::expand_macro_invocation;
@@ -56,7 +60,7 @@ pub trait HirDatabase: SyntaxDatabase
56 use fn crate::ty::type_for_field; 60 use fn crate::ty::type_for_field;
57 } 61 }
58 62
59 fn file_items(file_id: FileId) -> Arc<SourceFileItems> { 63 fn file_items(mfile_id: MFileId) -> Arc<SourceFileItems> {
60 type SourceFileItemsQuery; 64 type SourceFileItemsQuery;
61 use fn query_definitions::file_items; 65 use fn query_definitions::file_items;
62 } 66 }