aboutsummaryrefslogtreecommitdiff
path: root/crates/ssr/src/matching.rs
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2020-08-19 14:17:05 +0100
committerGitHub <[email protected]>2020-08-19 14:17:05 +0100
commite8d266fa6dd7ee883d1bba52eb6a37c5e473978f (patch)
tree5ef5dceeeafb7105f41b6fe12bb1563f424f2e87 /crates/ssr/src/matching.rs
parent422856d70f934b49f5b35043f3b51b6da08a61fa (diff)
parentb9b4693ce3bf0229ea40f09e6404fad3e7823321 (diff)
Merge #5814
5814: Add SelfParam to code_model r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ssr/src/matching.rs')
-rw-r--r--crates/ssr/src/matching.rs2
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();