From b5ce84b17023d27f4e96ec7911aca712db0e000b Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Thu, 16 Jul 2020 13:15:00 +0200 Subject: Align CallableDefId naming with other ids --- crates/ra_ide/src/call_hierarchy.rs | 2 +- crates/ra_ide/src/call_info.rs | 6 +++--- crates/ra_ide/src/inlay_hints.rs | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) (limited to 'crates/ra_ide/src') 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 //FIXME: Type::as_callable is broken let callable_def = sema.type_of_expr(&expr.expr()?)?.as_callable()?; match callable_def { - hir::CallableDef::FunctionId(it) => { + hir::CallableDefId::FunctionId(it) => { let fn_def: hir::Function = it.into(); let nav = fn_def.to_nav(db); 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, token: SyntaxToken) -> Op //FIXME: Type::as_callable is broken let callable_def = sema.type_of_expr(&call.expr()?)?.as_callable()?; match callable_def { - hir::CallableDef::FunctionId(it) => { + hir::CallableDefId::FunctionId(it) => { let fn_def = it.into(); FunctionSignature::from_hir(sema.db, fn_def) } - hir::CallableDef::StructId(it) => { + hir::CallableDefId::StructId(it) => { FunctionSignature::from_struct(sema.db, it.into())? } - hir::CallableDef::EnumVariantId(it) => { + hir::CallableDefId::EnumVariantId(it) => { FunctionSignature::from_enum_variant(sema.db, it.into())? } } 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, expr: &ast::Expr) -> Option< // FIXME: Type::as_callable is broken for closures let callable_def = sema.type_of_expr(&expr.expr()?)?.as_callable()?; match callable_def { - hir::CallableDef::FunctionId(it) => { + hir::CallableDefId::FunctionId(it) => { Some(FunctionSignature::from_hir(sema.db, it.into())) } - hir::CallableDef::StructId(it) => { + hir::CallableDefId::StructId(it) => { FunctionSignature::from_struct(sema.db, it.into()) } - hir::CallableDef::EnumVariantId(it) => { + hir::CallableDefId::EnumVariantId(it) => { FunctionSignature::from_enum_variant(sema.db, it.into()) } } -- cgit v1.2.3