From b9b4693ce3bf0229ea40f09e6404fad3e7823321 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Wed, 19 Aug 2020 15:16:24 +0200 Subject: Add SelfParam to code_model --- crates/ssr/src/matching.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crates/ssr/src/matching.rs') 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> { // 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(); -- cgit v1.2.3