aboutsummaryrefslogtreecommitdiff
path: root/crates
diff options
context:
space:
mode:
authorAnatol Liu <[email protected]>2020-11-05 04:08:46 +0000
committerAnatol Liu <[email protected]>2020-11-05 23:46:04 +0000
commit3aa0e40726b44564e5f68612517d0d65d519275a (patch)
tree0728b891c79e05b5d194dd0772578e0286287c9f /crates
parent14b38e198cbf6413eb52d61671c904014ed6037d (diff)
Add static semantic token modifier for associated functions with no &self
refactor logic into code_model.rs address comments
Diffstat (limited to 'crates')
-rw-r--r--crates/hir/src/code_model.rs6
1 files changed, 1 insertions, 5 deletions
diff --git a/crates/hir/src/code_model.rs b/crates/hir/src/code_model.rs
index 1319eb9cb..3277597c6 100644
--- a/crates/hir/src/code_model.rs
+++ b/crates/hir/src/code_model.rs
@@ -802,11 +802,7 @@ impl Function {
802 .and_then(|s| s.parent()) 802 .and_then(|s| s.parent())
803 .and_then(|s| Some(s.kind())); 803 .and_then(|s| Some(s.kind()));
804 804
805 match fn_parent_kind { 805 matches!(fn_parent_kind, Some(SyntaxKind::IMPL) | Some(SyntaxKind::TRAIT))
806 Some(SyntaxKind::IMPL) => true,
807 Some(SyntaxKind::TRAIT) => true,
808 _ => false,
809 }
810 } 806 }
811} 807}
812 808