diff options
Diffstat (limited to 'crates/ra_analysis/src/hir/module/nameres.rs')
-rw-r--r-- | crates/ra_analysis/src/hir/module/nameres.rs | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/crates/ra_analysis/src/hir/module/nameres.rs b/crates/ra_analysis/src/hir/module/nameres.rs index 1ec85fbf2..bb5a888c8 100644 --- a/crates/ra_analysis/src/hir/module/nameres.rs +++ b/crates/ra_analysis/src/hir/module/nameres.rs | |||
@@ -33,7 +33,7 @@ use crate::{ | |||
33 | loc2id::{DefId, DefLoc}, | 33 | loc2id::{DefId, DefLoc}, |
34 | hir::{ | 34 | hir::{ |
35 | Path, PathKind, | 35 | Path, PathKind, |
36 | DescriptorDatabase, | 36 | HirDatabase, |
37 | module::{ModuleId, ModuleTree, ModuleSourceNode}, | 37 | module::{ModuleId, ModuleTree, ModuleSourceNode}, |
38 | }, | 38 | }, |
39 | input::SourceRootId, | 39 | input::SourceRootId, |
@@ -71,7 +71,7 @@ impl Index<FileItemId> for FileItems { | |||
71 | } | 71 | } |
72 | } | 72 | } |
73 | 73 | ||
74 | pub(crate) fn file_items(db: &impl DescriptorDatabase, file_id: FileId) -> Arc<FileItems> { | 74 | pub(crate) fn file_items(db: &impl HirDatabase, file_id: FileId) -> Arc<FileItems> { |
75 | let source_file = db.file_syntax(file_id); | 75 | let source_file = db.file_syntax(file_id); |
76 | let source_file = source_file.borrowed(); | 76 | let source_file = source_file.borrowed(); |
77 | let mut res = FileItems::default(); | 77 | let mut res = FileItems::default(); |
@@ -87,7 +87,7 @@ pub(crate) fn file_items(db: &impl DescriptorDatabase, file_id: FileId) -> Arc<F | |||
87 | } | 87 | } |
88 | 88 | ||
89 | pub(crate) fn file_item( | 89 | pub(crate) fn file_item( |
90 | db: &impl DescriptorDatabase, | 90 | db: &impl HirDatabase, |
91 | file_id: FileId, | 91 | file_id: FileId, |
92 | file_item_id: FileItemId, | 92 | file_item_id: FileItemId, |
93 | ) -> SyntaxNode { | 93 | ) -> SyntaxNode { |
@@ -154,7 +154,7 @@ pub(crate) struct NamedImport { | |||
154 | } | 154 | } |
155 | 155 | ||
156 | impl NamedImport { | 156 | impl NamedImport { |
157 | pub(crate) fn range(&self, db: &impl DescriptorDatabase, file_id: FileId) -> TextRange { | 157 | pub(crate) fn range(&self, db: &impl HirDatabase, file_id: FileId) -> TextRange { |
158 | let syntax = db._file_item(file_id, self.file_item_id); | 158 | let syntax = db._file_item(file_id, self.file_item_id); |
159 | let offset = syntax.borrowed().range().start(); | 159 | let offset = syntax.borrowed().range().start(); |
160 | self.relative_range + offset | 160 | self.relative_range + offset |
@@ -168,7 +168,7 @@ enum ImportKind { | |||
168 | } | 168 | } |
169 | 169 | ||
170 | pub(crate) fn input_module_items( | 170 | pub(crate) fn input_module_items( |
171 | db: &impl DescriptorDatabase, | 171 | db: &impl HirDatabase, |
172 | source_root: SourceRootId, | 172 | source_root: SourceRootId, |
173 | module_id: ModuleId, | 173 | module_id: ModuleId, |
174 | ) -> Cancelable<Arc<InputModuleItems>> { | 174 | ) -> Cancelable<Arc<InputModuleItems>> { |
@@ -193,7 +193,7 @@ pub(crate) fn input_module_items( | |||
193 | } | 193 | } |
194 | 194 | ||
195 | pub(crate) fn item_map( | 195 | pub(crate) fn item_map( |
196 | db: &impl DescriptorDatabase, | 196 | db: &impl HirDatabase, |
197 | source_root: SourceRootId, | 197 | source_root: SourceRootId, |
198 | ) -> Cancelable<Arc<ItemMap>> { | 198 | ) -> Cancelable<Arc<ItemMap>> { |
199 | let start = Instant::now(); | 199 | let start = Instant::now(); |
@@ -316,7 +316,7 @@ struct Resolver<'a, DB> { | |||
316 | 316 | ||
317 | impl<'a, DB> Resolver<'a, DB> | 317 | impl<'a, DB> Resolver<'a, DB> |
318 | where | 318 | where |
319 | DB: DescriptorDatabase, | 319 | DB: HirDatabase, |
320 | { | 320 | { |
321 | fn resolve(&mut self) -> Cancelable<()> { | 321 | fn resolve(&mut self) -> Cancelable<()> { |
322 | for (&module_id, items) in self.input.iter() { | 322 | for (&module_id, items) in self.input.iter() { |
@@ -447,7 +447,7 @@ mod tests { | |||
447 | use crate::{ | 447 | use crate::{ |
448 | AnalysisChange, | 448 | AnalysisChange, |
449 | mock_analysis::{MockAnalysis, analysis_and_position}, | 449 | mock_analysis::{MockAnalysis, analysis_and_position}, |
450 | hir::{DescriptorDatabase, module::ModuleDescriptor}, | 450 | hir::{HirDatabase, module::ModuleDescriptor}, |
451 | input::FilesDatabase, | 451 | input::FilesDatabase, |
452 | }; | 452 | }; |
453 | use super::*; | 453 | use super::*; |