diff options
author | Aleksey Kladov <[email protected]> | 2019-11-22 14:10:51 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2019-11-22 14:18:04 +0000 |
commit | 78f3b0627cf4a5d34aaf63c7b5a2e1b744a11b14 (patch) | |
tree | 0c0e07fefce4b4175e8162bcd586aaca17512bb8 /crates/ra_ide_api/src/call_info.rs | |
parent | a132cc715ed05cab83fd058156eb152f0be96982 (diff) |
Move FunctionData to hir_def
Diffstat (limited to 'crates/ra_ide_api/src/call_info.rs')
-rw-r--r-- | crates/ra_ide_api/src/call_info.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_ide_api/src/call_info.rs b/crates/ra_ide_api/src/call_info.rs index 41ee81511..7c367230e 100644 --- a/crates/ra_ide_api/src/call_info.rs +++ b/crates/ra_ide_api/src/call_info.rs | |||
@@ -30,7 +30,7 @@ pub(crate) fn call_info(db: &RootDatabase, position: FilePosition) -> Option<Cal | |||
30 | let (callable_def, _subst) = analyzer.type_of(db, &expr.expr()?)?.as_callable()?; | 30 | let (callable_def, _subst) = analyzer.type_of(db, &expr.expr()?)?.as_callable()?; |
31 | match callable_def { | 31 | match callable_def { |
32 | hir::CallableDef::Function(it) => { | 32 | hir::CallableDef::Function(it) => { |
33 | (CallInfo::with_fn(db, it), it.data(db).has_self_param()) | 33 | (CallInfo::with_fn(db, it), it.has_self_param(db)) |
34 | } | 34 | } |
35 | hir::CallableDef::Struct(it) => (CallInfo::with_struct(db, it)?, false), | 35 | hir::CallableDef::Struct(it) => (CallInfo::with_struct(db, it)?, false), |
36 | hir::CallableDef::EnumVariant(it) => (CallInfo::with_enum_variant(db, it)?, false), | 36 | hir::CallableDef::EnumVariant(it) => (CallInfo::with_enum_variant(db, it)?, false), |
@@ -38,7 +38,7 @@ pub(crate) fn call_info(db: &RootDatabase, position: FilePosition) -> Option<Cal | |||
38 | } | 38 | } |
39 | FnCallNode::MethodCallExpr(expr) => { | 39 | FnCallNode::MethodCallExpr(expr) => { |
40 | let function = analyzer.resolve_method_call(&expr)?; | 40 | let function = analyzer.resolve_method_call(&expr)?; |
41 | (CallInfo::with_fn(db, function), function.data(db).has_self_param()) | 41 | (CallInfo::with_fn(db, function), function.has_self_param(db)) |
42 | } | 42 | } |
43 | FnCallNode::MacroCallExpr(expr) => { | 43 | FnCallNode::MacroCallExpr(expr) => { |
44 | let macro_def = analyzer.resolve_macro_call(db, &expr)?; | 44 | let macro_def = analyzer.resolve_macro_call(db, &expr)?; |