From 14b38e198cbf6413eb52d61671c904014ed6037d 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 --- crates/hir/src/code_model.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/hir/src/code_model.rs b/crates/hir/src/code_model.rs index d04de053f..1319eb9cb 100644 --- a/crates/hir/src/code_model.rs +++ b/crates/hir/src/code_model.rs @@ -790,7 +790,7 @@ impl Function { /// whether this function is associated with some trait/impl pub fn is_associated(self, db: &dyn HirDatabase) -> bool { - if let Some(_) = self.self_param(db) { + if self.self_param(db).is_some() { return false; } -- cgit v1.2.3