diff options
Diffstat (limited to 'crates/ra_analysis/src/imp.rs')
-rw-r--r-- | crates/ra_analysis/src/imp.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/crates/ra_analysis/src/imp.rs b/crates/ra_analysis/src/imp.rs index 00c4a08bd..614a6e9be 100644 --- a/crates/ra_analysis/src/imp.rs +++ b/crates/ra_analysis/src/imp.rs | |||
@@ -226,7 +226,7 @@ impl AnalysisImpl { | |||
226 | let module_source = match find_node_at_offset::<ast::Module>(file.syntax(), position.offset) | 226 | let module_source = match find_node_at_offset::<ast::Module>(file.syntax(), position.offset) |
227 | { | 227 | { |
228 | Some(m) if !m.has_semi() => ModuleSource::new_inline(position.file_id, m), | 228 | Some(m) if !m.has_semi() => ModuleSource::new_inline(position.file_id, m), |
229 | _ => ModuleSource::File(position.file_id), | 229 | _ => ModuleSource::SourceFile(position.file_id), |
230 | }; | 230 | }; |
231 | 231 | ||
232 | let res = module_tree | 232 | let res = module_tree |
@@ -254,7 +254,7 @@ impl AnalysisImpl { | |||
254 | let module_tree = self.module_tree(file_id)?; | 254 | let module_tree = self.module_tree(file_id)?; |
255 | let crate_graph = self.db.crate_graph(); | 255 | let crate_graph = self.db.crate_graph(); |
256 | let res = module_tree | 256 | let res = module_tree |
257 | .modules_for_source(ModuleSource::File(file_id)) | 257 | .modules_for_source(ModuleSource::SourceFile(file_id)) |
258 | .into_iter() | 258 | .into_iter() |
259 | .map(|it| it.root(&module_tree)) | 259 | .map(|it| it.root(&module_tree)) |
260 | .filter_map(|it| it.source(&module_tree).as_file()) | 260 | .filter_map(|it| it.source(&module_tree).as_file()) |
@@ -386,7 +386,7 @@ impl AnalysisImpl { | |||
386 | fix: None, | 386 | fix: None, |
387 | }) | 387 | }) |
388 | .collect::<Vec<_>>(); | 388 | .collect::<Vec<_>>(); |
389 | if let Some(m) = module_tree.any_module_for_source(ModuleSource::File(file_id)) { | 389 | if let Some(m) = module_tree.any_module_for_source(ModuleSource::SourceFile(file_id)) { |
390 | for (name_node, problem) in m.problems(&module_tree, &*self.db) { | 390 | for (name_node, problem) in m.problems(&module_tree, &*self.db) { |
391 | let diag = match problem { | 391 | let diag = match problem { |
392 | Problem::UnresolvedModule { candidate } => { | 392 | Problem::UnresolvedModule { candidate } => { |
@@ -548,7 +548,7 @@ impl AnalysisImpl { | |||
548 | Some(name) => name.text(), | 548 | Some(name) => name.text(), |
549 | None => return Vec::new(), | 549 | None => return Vec::new(), |
550 | }; | 550 | }; |
551 | let module_id = match module_tree.any_module_for_source(ModuleSource::File(file_id)) { | 551 | let module_id = match module_tree.any_module_for_source(ModuleSource::SourceFile(file_id)) { |
552 | Some(id) => id, | 552 | Some(id) => id, |
553 | None => return Vec::new(), | 553 | None => return Vec::new(), |
554 | }; | 554 | }; |