mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 12:54:58 +00:00
Prefer hir::SelfParam
and fix signature help of methods from macros
This commit is contained in:
parent
6a2f83a8a2
commit
de86444756
3 changed files with 27 additions and 7 deletions
|
@ -560,8 +560,10 @@ impl<'db, 'sema> Matcher<'db, 'sema> {
|
|||
placeholder_value.autoref_kind = self
|
||||
.sema
|
||||
.resolve_method_call_as_callable(code)
|
||||
.and_then(|callable| callable.receiver_param(self.sema.db))
|
||||
.map(|(self_param, _)| self_param.kind())
|
||||
.and_then(|callable| {
|
||||
let (self_param, _) = callable.receiver_param(self.sema.db)?;
|
||||
Some(self_param.source(self.sema.db)?.value.kind())
|
||||
})
|
||||
.unwrap_or(ast::SelfParamKind::Owned);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue