mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-03 07:04:49 +00:00
Introduce TypeInfo
This commit is contained in:
parent
29506b5a26
commit
25ff7171c4
32 changed files with 127 additions and 124 deletions
|
@ -118,7 +118,7 @@ fn call_info_impl(
|
|||
let calling_node = FnCallNode::with_node(&token.parent()?)?;
|
||||
|
||||
let callable = match &calling_node {
|
||||
FnCallNode::CallExpr(call) => sema.type_of_expr(&call.expr()?)?.as_callable(sema.db)?,
|
||||
FnCallNode::CallExpr(call) => sema.type_of_expr(&call.expr()?)?.ty.as_callable(sema.db)?,
|
||||
FnCallNode::MethodCallExpr(call) => sema.resolve_method_call_as_callable(call)?,
|
||||
};
|
||||
let active_param = if let Some(arg_list) = calling_node.arg_list() {
|
||||
|
|
|
@ -543,7 +543,7 @@ impl ImportCandidate {
|
|||
match sema.resolve_method_call(method_call) {
|
||||
Some(_) => None,
|
||||
None => Some(Self::TraitMethod(TraitImportCandidate {
|
||||
receiver_ty: sema.type_of_expr(&method_call.receiver()?)?,
|
||||
receiver_ty: sema.type_of_expr(&method_call.receiver()?)?.ty,
|
||||
assoc_item_name: NameToImport::Exact(method_call.name_ref()?.to_string()),
|
||||
})),
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue