diff options
author | Aleksey Kladov <[email protected]> | 2019-01-06 13:05:59 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2019-01-06 14:35:57 +0000 |
commit | c303e6fbdfd8d04b645796489766e912d2cb3009 (patch) | |
tree | ff1ca323cc9dea0bc18001d39f1c9c979cef6dec /crates/ra_analysis/src/imp.rs | |
parent | a7f4f7bfcc524a55ba559e0141a70aa799a8686d (diff) |
fix ra_analysis to work with the new API
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 } => { |