diff options
author | Aleksey Kladov <[email protected]> | 2020-08-19 14:16:24 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2020-08-19 14:16:24 +0100 |
commit | b9b4693ce3bf0229ea40f09e6404fad3e7823321 (patch) | |
tree | 5ef5dceeeafb7105f41b6fe12bb1563f424f2e87 /crates/ssr/src/matching.rs | |
parent | a3b0a3aeb8061fc65951dd540bc92b94a96b4f2b (diff) |
Add SelfParam to code_model
Diffstat (limited to 'crates/ssr/src/matching.rs')
-rw-r--r-- | crates/ssr/src/matching.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/ssr/src/matching.rs b/crates/ssr/src/matching.rs index 8bb5ced90..26968c474 100644 --- a/crates/ssr/src/matching.rs +++ b/crates/ssr/src/matching.rs | |||
@@ -545,7 +545,7 @@ impl<'db, 'sema> Matcher<'db, 'sema> { | |||
545 | // If the function we're calling takes a self parameter, then we store additional | 545 | // If the function we're calling takes a self parameter, then we store additional |
546 | // information on the placeholder match about autoderef and autoref. This allows us to use | 546 | // information on the placeholder match about autoderef and autoref. This allows us to use |
547 | // the placeholder in a context where autoderef and autoref don't apply. | 547 | // the placeholder in a context where autoderef and autoref don't apply. |
548 | if code_resolved_function.has_self_param(self.sema.db) { | 548 | if code_resolved_function.self_param(self.sema.db).is_some() { |
549 | if let (Some(pattern_type), Some(expr)) = (&pattern_ufcs.qualifier_type, &code.expr()) { | 549 | if let (Some(pattern_type), Some(expr)) = (&pattern_ufcs.qualifier_type, &code.expr()) { |
550 | let deref_count = self.check_expr_type(pattern_type, expr)?; | 550 | let deref_count = self.check_expr_type(pattern_type, expr)?; |
551 | let pattern_receiver = pattern_args.next(); | 551 | let pattern_receiver = pattern_args.next(); |