diff options
Diffstat (limited to 'crates/ra_analysis/src/imp.rs')
-rw-r--r-- | crates/ra_analysis/src/imp.rs | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/crates/ra_analysis/src/imp.rs b/crates/ra_analysis/src/imp.rs index ad6b52371..8a41b3152 100644 --- a/crates/ra_analysis/src/imp.rs +++ b/crates/ra_analysis/src/imp.rs | |||
@@ -450,14 +450,8 @@ impl AnalysisImpl { | |||
450 | let syntax = file.syntax(); | 450 | let syntax = file.syntax(); |
451 | 451 | ||
452 | // Find the calling expression and it's NameRef | 452 | // Find the calling expression and it's NameRef |
453 | let calling_node = match FnCallNode::with_node(syntax, position.offset) { | 453 | let calling_node = ctry!(FnCallNode::with_node(syntax, position.offset)); |
454 | Some(node) => node, | 454 | let name_ref = ctry!(calling_node.name_ref()); |
455 | None => return Ok(None), | ||
456 | }; | ||
457 | let name_ref = match calling_node.name_ref() { | ||
458 | Some(name) => name, | ||
459 | None => return Ok(None), | ||
460 | }; | ||
461 | 455 | ||
462 | // Resolve the function's NameRef (NOTE: this isn't entirely accurate). | 456 | // Resolve the function's NameRef (NOTE: this isn't entirely accurate). |
463 | let file_symbols = self.index_resolve(name_ref)?; | 457 | let file_symbols = self.index_resolve(name_ref)?; |