mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 22:01:37 +00:00
Align CallableDefId naming with other ids
This commit is contained in:
parent
b598ab8be4
commit
b5ce84b170
14 changed files with 59 additions and 57 deletions
|
@ -324,13 +324,13 @@ fn get_fn_signature(sema: &Semantics<RootDatabase>, 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())
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue