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.rs18
1 files changed, 11 insertions, 7 deletions
diff --git a/crates/ra_analysis/src/hir/db.rs b/crates/ra_analysis/src/hir/db.rs
index 0998295f5..bf0dc393a 100644
--- a/crates/ra_analysis/src/hir/db.rs
+++ b/crates/ra_analysis/src/hir/db.rs
@@ -8,20 +8,24 @@ use ra_syntax::{
8use crate::{ 8use crate::{
9 FileId, 9 FileId,
10 db::SyntaxDatabase, 10 db::SyntaxDatabase,
11 hir::{SourceFileItems, SourceItemId}, 11 hir::{
12 hir::query_definitions, 12 SourceFileItems, SourceItemId,
13 hir::function::{FnId, FnScopes}, 13 query_definitions,
14 hir::module::{ 14 function::{FnScopes},
15 ModuleId, ModuleTree, ModuleSource, 15 module::{ModuleId, ModuleTree, ModuleSource,
16 nameres::{ItemMap, InputModuleItems} 16 nameres::{ItemMap, InputModuleItems}},
17 }, 17 },
18 input::SourceRootId, 18 input::SourceRootId,
19 loc2id::{DefLoc, DefId, FnId, LocationIntener},
19 Cancelable, 20 Cancelable,
20}; 21};
21 22
22salsa::query_group! { 23salsa::query_group! {
23 24
24pub(crate) trait HirDatabase: SyntaxDatabase { 25pub(crate) trait HirDatabase: SyntaxDatabase
26 + AsRef<LocationIntener<DefLoc, DefId>>
27 + AsRef<LocationIntener<SourceItemId, FnId>>
28{
25 fn fn_scopes(fn_id: FnId) -> Arc<FnScopes> { 29 fn fn_scopes(fn_id: FnId) -> Arc<FnScopes> {
26 type FnScopesQuery; 30 type FnScopesQuery;
27 use fn query_definitions::fn_scopes; 31 use fn query_definitions::fn_scopes;