aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide_api/src/call_info.rs
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2019-04-11 15:15:20 +0100
committerAleksey Kladov <[email protected]>2019-04-11 15:15:20 +0100
commit20013de2abb95bc024f55163b1a5044cfb52a873 (patch)
tree2221a4f959ad4f672e0b421e35d1a0ec3c5d799d /crates/ra_ide_api/src/call_info.rs
parentcf2ba2791d57123248141a3066071180f4255b1c (diff)
fix typo
Diffstat (limited to 'crates/ra_ide_api/src/call_info.rs')
-rw-r--r--crates/ra_ide_api/src/call_info.rs6
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);