diff options
Diffstat (limited to 'crates/hir_ty/src/test_db.rs')
-rw-r--r-- | crates/hir_ty/src/test_db.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/hir_ty/src/test_db.rs b/crates/hir_ty/src/test_db.rs index 646e16bbe..3bbcbc242 100644 --- a/crates/hir_ty/src/test_db.rs +++ b/crates/hir_ty/src/test_db.rs | |||
@@ -81,7 +81,7 @@ impl TestDB { | |||
81 | pub(crate) fn module_for_file(&self, file_id: FileId) -> ModuleId { | 81 | pub(crate) fn module_for_file(&self, file_id: FileId) -> ModuleId { |
82 | for &krate in self.relevant_crates(file_id).iter() { | 82 | for &krate in self.relevant_crates(file_id).iter() { |
83 | let crate_def_map = self.crate_def_map(krate); | 83 | let crate_def_map = self.crate_def_map(krate); |
84 | for (local_id, data) in crate_def_map.modules.iter() { | 84 | for (local_id, data) in crate_def_map.modules() { |
85 | if data.origin.file_id() == Some(file_id) { | 85 | if data.origin.file_id() == Some(file_id) { |
86 | return ModuleId { krate, local_id }; | 86 | return ModuleId { krate, local_id }; |
87 | } | 87 | } |
@@ -95,7 +95,7 @@ impl TestDB { | |||
95 | let crate_graph = self.crate_graph(); | 95 | let crate_graph = self.crate_graph(); |
96 | for krate in crate_graph.iter() { | 96 | for krate in crate_graph.iter() { |
97 | let crate_def_map = self.crate_def_map(krate); | 97 | let crate_def_map = self.crate_def_map(krate); |
98 | for (module_id, _) in crate_def_map.modules.iter() { | 98 | for (module_id, _) in crate_def_map.modules() { |
99 | let file_id = crate_def_map[module_id].origin.file_id(); | 99 | let file_id = crate_def_map[module_id].origin.file_id(); |
100 | files.extend(file_id) | 100 | files.extend(file_id) |
101 | } | 101 | } |