mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 14:21:44 +00:00
Record method call substs and use them in call info
This commit is contained in:
parent
96e5412f88
commit
4a6cdd776d
9 changed files with 125 additions and 45 deletions
|
@ -181,7 +181,7 @@ impl<'a, 'b> ExprValidator<'a, 'b> {
|
|||
for (id, expr) in body.exprs.iter() {
|
||||
if let Expr::MethodCall { receiver, .. } = expr {
|
||||
let function_id = match self.infer.method_resolution(id) {
|
||||
Some(id) => id,
|
||||
Some((id, _)) => id,
|
||||
None => continue,
|
||||
};
|
||||
|
||||
|
@ -239,15 +239,11 @@ impl<'a, 'b> ExprValidator<'a, 'b> {
|
|||
return;
|
||||
}
|
||||
|
||||
// FIXME: note that we erase information about substs here. This
|
||||
// is not right, but, luckily, doesn't matter as we care only
|
||||
// about the number of params
|
||||
let callee = match self.infer.method_resolution(call_id) {
|
||||
Some(callee) => callee,
|
||||
let (callee, subst) = match self.infer.method_resolution(call_id) {
|
||||
Some(it) => it,
|
||||
None => return,
|
||||
};
|
||||
let sig =
|
||||
db.callable_item_signature(callee.into()).into_value_and_skipped_binders().0;
|
||||
let sig = db.callable_item_signature(callee.into()).substitute(&Interner, &subst);
|
||||
|
||||
(sig, args)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue