mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-02 06:41:48 +00:00
Add SelfParam to code_model
This commit is contained in:
parent
a3b0a3aeb8
commit
b9b4693ce3
9 changed files with 62 additions and 43 deletions
|
@ -545,7 +545,7 @@ impl<'db, 'sema> Matcher<'db, 'sema> {
|
|||
// If the function we're calling takes a self parameter, then we store additional
|
||||
// information on the placeholder match about autoderef and autoref. This allows us to use
|
||||
// the placeholder in a context where autoderef and autoref don't apply.
|
||||
if code_resolved_function.has_self_param(self.sema.db) {
|
||||
if code_resolved_function.self_param(self.sema.db).is_some() {
|
||||
if let (Some(pattern_type), Some(expr)) = (&pattern_ufcs.qualifier_type, &code.expr()) {
|
||||
let deref_count = self.check_expr_type(pattern_type, expr)?;
|
||||
let pattern_receiver = pattern_args.next();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue