diff options
Diffstat (limited to 'crates/ra_hir/src/mock.rs')
-rw-r--r-- | crates/ra_hir/src/mock.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/crates/ra_hir/src/mock.rs b/crates/ra_hir/src/mock.rs index 8dcea5071..cb405091e 100644 --- a/crates/ra_hir/src/mock.rs +++ b/crates/ra_hir/src/mock.rs | |||
@@ -93,7 +93,11 @@ impl MockDatabase { | |||
93 | let mut files: Vec<FileId> = self.files.values().copied().collect(); | 93 | let mut files: Vec<FileId> = self.files.values().copied().collect(); |
94 | files.sort(); | 94 | files.sort(); |
95 | for file in files { | 95 | for file in files { |
96 | let module = crate::source_binder::module_from_file_id(self, file).unwrap(); | 96 | let src = crate::Source { |
97 | file_id: file.into(), | ||
98 | ast: crate::ModuleSource::new(self, Some(file), None), | ||
99 | }; | ||
100 | let module = crate::Module::from_definition(self, src).unwrap(); | ||
97 | module.diagnostics( | 101 | module.diagnostics( |
98 | self, | 102 | self, |
99 | &mut DiagnosticSink::new(|d| { | 103 | &mut DiagnosticSink::new(|d| { |