diff options
Diffstat (limited to 'crates/ra_hir/src/nameres/raw.rs')
-rw-r--r-- | crates/ra_hir/src/nameres/raw.rs | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/crates/ra_hir/src/nameres/raw.rs b/crates/ra_hir/src/nameres/raw.rs index 1b4dcbb7a..21935dbb9 100644 --- a/crates/ra_hir/src/nameres/raw.rs +++ b/crates/ra_hir/src/nameres/raw.rs | |||
@@ -7,7 +7,7 @@ use ra_syntax::{ | |||
7 | ast::{self, NameOwner, AttrsOwner}, | 7 | ast::{self, NameOwner, AttrsOwner}, |
8 | }; | 8 | }; |
9 | 9 | ||
10 | use crate::{DefDatabase, Name, AsName, Path, HirFileId, ModuleSource, AstIdMap, FileAstId, Either}; | 10 | use crate::{DefDatabase, Name, AsName, Path, HirFileId, ModuleSource, AstIdMap, FileAstId, Either, AstDatabase}; |
11 | 11 | ||
12 | /// `RawItems` is a set of top-level items in a file (except for impls). | 12 | /// `RawItems` is a set of top-level items in a file (except for impls). |
13 | /// | 13 | /// |
@@ -56,12 +56,15 @@ impl ImportSourceMap { | |||
56 | } | 56 | } |
57 | 57 | ||
58 | impl RawItems { | 58 | impl RawItems { |
59 | pub(crate) fn raw_items_query(db: &impl DefDatabase, file_id: HirFileId) -> Arc<RawItems> { | 59 | pub(crate) fn raw_items_query( |
60 | db: &(impl DefDatabase + AstDatabase), | ||
61 | file_id: HirFileId, | ||
62 | ) -> Arc<RawItems> { | ||
60 | db.raw_items_with_source_map(file_id).0 | 63 | db.raw_items_with_source_map(file_id).0 |
61 | } | 64 | } |
62 | 65 | ||
63 | pub(crate) fn raw_items_with_source_map_query( | 66 | pub(crate) fn raw_items_with_source_map_query( |
64 | db: &impl DefDatabase, | 67 | db: &(impl DefDatabase + AstDatabase), |
65 | file_id: HirFileId, | 68 | file_id: HirFileId, |
66 | ) -> (Arc<RawItems>, Arc<ImportSourceMap>) { | 69 | ) -> (Arc<RawItems>, Arc<ImportSourceMap>) { |
67 | let mut collector = RawItemsCollector { | 70 | let mut collector = RawItemsCollector { |