aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2020-07-16 12:15:00 +0100
committerAleksey Kladov <[email protected]>2020-07-16 12:16:34 +0100
commitb5ce84b17023d27f4e96ec7911aca712db0e000b (patch)
tree96f00583eaa8659a21960fa5fc4717d4d9bf0962 /crates/ra_ide
parentb598ab8be46b50d5f407c3858c7b2c788328edc7 (diff)
Align CallableDefId naming with other ids
Diffstat (limited to 'crates/ra_ide')
-rw-r--r--crates/ra_ide/src/call_hierarchy.rs2
-rw-r--r--crates/ra_ide/src/call_info.rs6
-rw-r--r--crates/ra_ide/src/inlay_hints.rs6
3 files changed, 7 insertions, 7 deletions
diff --git a/crates/ra_ide/src/call_hierarchy.rs b/crates/ra_ide/src/call_hierarchy.rs
index 884353808..cb7e62cd6 100644
--- a/crates/ra_ide/src/call_hierarchy.rs
+++ b/crates/ra_ide/src/call_hierarchy.rs
@@ -97,7 +97,7 @@ pub(crate) fn outgoing_calls(db: &RootDatabase, position: FilePosition) -> Optio
97 //FIXME: Type::as_callable is broken 97 //FIXME: Type::as_callable is broken
98 let callable_def = sema.type_of_expr(&expr.expr()?)?.as_callable()?; 98 let callable_def = sema.type_of_expr(&expr.expr()?)?.as_callable()?;
99 match callable_def { 99 match callable_def {
100 hir::CallableDef::FunctionId(it) => { 100 hir::CallableDefId::FunctionId(it) => {
101 let fn_def: hir::Function = it.into(); 101 let fn_def: hir::Function = it.into();
102 let nav = fn_def.to_nav(db); 102 let nav = fn_def.to_nav(db);
103 Some(nav) 103 Some(nav)
diff --git a/crates/ra_ide/src/call_info.rs b/crates/ra_ide/src/call_info.rs
index 0ef92ed4b..1fe1c21de 100644
--- a/crates/ra_ide/src/call_info.rs
+++ b/crates/ra_ide/src/call_info.rs
@@ -53,14 +53,14 @@ fn call_info_for_token(sema: &Semantics<RootDatabase>, token: SyntaxToken) -> Op
53 //FIXME: Type::as_callable is broken 53 //FIXME: Type::as_callable is broken
54 let callable_def = sema.type_of_expr(&call.expr()?)?.as_callable()?; 54 let callable_def = sema.type_of_expr(&call.expr()?)?.as_callable()?;
55 match callable_def { 55 match callable_def {
56 hir::CallableDef::FunctionId(it) => { 56 hir::CallableDefId::FunctionId(it) => {
57 let fn_def = it.into(); 57 let fn_def = it.into();
58 FunctionSignature::from_hir(sema.db, fn_def) 58 FunctionSignature::from_hir(sema.db, fn_def)
59 } 59 }
60 hir::CallableDef::StructId(it) => { 60 hir::CallableDefId::StructId(it) => {
61 FunctionSignature::from_struct(sema.db, it.into())? 61 FunctionSignature::from_struct(sema.db, it.into())?
62 } 62 }
63 hir::CallableDef::EnumVariantId(it) => { 63 hir::CallableDefId::EnumVariantId(it) => {
64 FunctionSignature::from_enum_variant(sema.db, it.into())? 64 FunctionSignature::from_enum_variant(sema.db, it.into())?
65 } 65 }
66 } 66 }
diff --git a/crates/ra_ide/src/inlay_hints.rs b/crates/ra_ide/src/inlay_hints.rs
index 35ab741d8..3cbae8a45 100644
--- a/crates/ra_ide/src/inlay_hints.rs
+++ b/crates/ra_ide/src/inlay_hints.rs
@@ -324,13 +324,13 @@ fn get_fn_signature(sema: &Semantics<RootDatabase>, expr: &ast::Expr) -> Option<
324 // FIXME: Type::as_callable is broken for closures 324 // FIXME: Type::as_callable is broken for closures
325 let callable_def = sema.type_of_expr(&expr.expr()?)?.as_callable()?; 325 let callable_def = sema.type_of_expr(&expr.expr()?)?.as_callable()?;
326 match callable_def { 326 match callable_def {
327 hir::CallableDef::FunctionId(it) => { 327 hir::CallableDefId::FunctionId(it) => {
328 Some(FunctionSignature::from_hir(sema.db, it.into())) 328 Some(FunctionSignature::from_hir(sema.db, it.into()))
329 } 329 }
330 hir::CallableDef::StructId(it) => { 330 hir::CallableDefId::StructId(it) => {
331 FunctionSignature::from_struct(sema.db, it.into()) 331 FunctionSignature::from_struct(sema.db, it.into())
332 } 332 }
333 hir::CallableDef::EnumVariantId(it) => { 333 hir::CallableDefId::EnumVariantId(it) => {
334 FunctionSignature::from_enum_variant(sema.db, it.into()) 334 FunctionSignature::from_enum_variant(sema.db, it.into())
335 } 335 }
336 } 336 }