diff options
Diffstat (limited to 'crates/ra_analysis/src/imp.rs')
-rw-r--r-- | crates/ra_analysis/src/imp.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/crates/ra_analysis/src/imp.rs b/crates/ra_analysis/src/imp.rs index 44e7aca44..07a966290 100644 --- a/crates/ra_analysis/src/imp.rs +++ b/crates/ra_analysis/src/imp.rs | |||
@@ -109,8 +109,7 @@ impl db::RootDatabase { | |||
109 | None => return Ok(Vec::new()), | 109 | None => return Ok(Vec::new()), |
110 | Some(it) => it, | 110 | Some(it) => it, |
111 | }; | 111 | }; |
112 | let (file_id, ast_module) = module.source(self); | 112 | let (file_id, ast_module) = match module.declaration_source(self)? { |
113 | let ast_module = match ast_module { | ||
114 | None => return Ok(Vec::new()), | 113 | None => return Ok(Vec::new()), |
115 | Some(it) => it, | 114 | Some(it) => it, |
116 | }; | 115 | }; |
@@ -206,7 +205,7 @@ impl db::RootDatabase { | |||
206 | }) | 205 | }) |
207 | .collect::<Vec<_>>(); | 206 | .collect::<Vec<_>>(); |
208 | if let Some(m) = source_binder::module_from_file_id(self, file_id)? { | 207 | if let Some(m) = source_binder::module_from_file_id(self, file_id)? { |
209 | for (name_node, problem) in m.problems(self) { | 208 | for (name_node, problem) in m.problems(self)? { |
210 | let source_root = self.file_source_root(file_id); | 209 | let source_root = self.file_source_root(file_id); |
211 | let diag = match problem { | 210 | let diag = match problem { |
212 | Problem::UnresolvedModule { candidate } => { | 211 | Problem::UnresolvedModule { candidate } => { |