diff options
Diffstat (limited to 'crates/ra_ide_api')
-rw-r--r-- | crates/ra_ide_api/src/call_info.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/ra_ide_api/src/call_info.rs b/crates/ra_ide_api/src/call_info.rs index a6676cad5..a8495ab01 100644 --- a/crates/ra_ide_api/src/call_info.rs +++ b/crates/ra_ide_api/src/call_info.rs | |||
@@ -17,19 +17,19 @@ pub(crate) fn call_info(db: &RootDatabase, position: FilePosition) -> Option<Cal | |||
17 | let calling_node = FnCallNode::with_node(syntax, position.offset)?; | 17 | let calling_node = FnCallNode::with_node(syntax, position.offset)?; |
18 | let name_ref = calling_node.name_ref()?; | 18 | let name_ref = calling_node.name_ref()?; |
19 | 19 | ||
20 | let analyser = hir::SourceAnalyzer::new(db, position.file_id, name_ref.syntax()); | 20 | let analyzer = hir::SourceAnalyzer::new(db, position.file_id, name_ref.syntax()); |
21 | let function = match calling_node { | 21 | let function = match calling_node { |
22 | FnCallNode::CallExpr(expr) => { | 22 | FnCallNode::CallExpr(expr) => { |
23 | //FIXME: apply subst | 23 | //FIXME: apply subst |
24 | let (callable_def, _subst) = | 24 | let (callable_def, _subst) = |
25 | analyser.type_of(db, expr.expr()?.into())?.as_callable()?; | 25 | analyzer.type_of(db, expr.expr()?.into())?.as_callable()?; |
26 | match callable_def { | 26 | match callable_def { |
27 | hir::CallableDef::Function(it) => it, | 27 | hir::CallableDef::Function(it) => it, |
28 | //FIXME: handle other callables | 28 | //FIXME: handle other callables |
29 | _ => return None, | 29 | _ => return None, |
30 | } | 30 | } |
31 | } | 31 | } |
32 | FnCallNode::MethodCallExpr(expr) => analyser.resolve_method_call(expr)?, | 32 | FnCallNode::MethodCallExpr(expr) => analyzer.resolve_method_call(expr)?, |
33 | }; | 33 | }; |
34 | 34 | ||
35 | let mut call_info = CallInfo::new(db, function); | 35 | let mut call_info = CallInfo::new(db, function); |