From 90031a267a2ea510cede2ab5c3164bb8605a69ac Mon Sep 17 00:00:00 2001 From: Anatol Liu Date: Wed, 4 Nov 2020 20:08:46 -0800 Subject: Add static semantic token modifier for associated functions with no &self refactor logic into code_model.rs address comments --- crates/hir/src/code_model.rs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'crates/hir') diff --git a/crates/hir/src/code_model.rs b/crates/hir/src/code_model.rs index 3277597c6..fadd010e2 100644 --- a/crates/hir/src/code_model.rs +++ b/crates/hir/src/code_model.rs @@ -789,11 +789,7 @@ impl Function { } /// whether this function is associated with some trait/impl - pub fn is_associated(self, db: &dyn HirDatabase) -> bool { - if self.self_param(db).is_some() { - return false; - } - + pub fn is_assoc_item(self, db: &dyn HirDatabase) -> bool { let fn_parent_kind = self .source(db) .value -- cgit v1.2.3