diff options
Diffstat (limited to 'crates/ide/src/syntax_highlighting.rs')
-rw-r--r-- | crates/ide/src/syntax_highlighting.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ide/src/syntax_highlighting.rs b/crates/ide/src/syntax_highlighting.rs index 41fd36edf..4a01097df 100644 --- a/crates/ide/src/syntax_highlighting.rs +++ b/crates/ide/src/syntax_highlighting.rs | |||
@@ -6,7 +6,7 @@ pub(crate) mod tags; | |||
6 | #[cfg(test)] | 6 | #[cfg(test)] |
7 | mod tests; | 7 | mod tests; |
8 | 8 | ||
9 | use hir::{Local, Name, Semantics, VariantDef}; | 9 | use hir::{AsAssocItem, Local, Name, Semantics, VariantDef}; |
10 | use ide_db::{ | 10 | use ide_db::{ |
11 | defs::{Definition, NameClass, NameRefClass}, | 11 | defs::{Definition, NameClass, NameRefClass}, |
12 | RootDatabase, | 12 | RootDatabase, |
@@ -746,7 +746,7 @@ fn highlight_def(db: &RootDatabase, def: Definition) -> Highlight { | |||
746 | if func.is_unsafe(db) { | 746 | if func.is_unsafe(db) { |
747 | h |= HighlightModifier::Unsafe; | 747 | h |= HighlightModifier::Unsafe; |
748 | } | 748 | } |
749 | if func.is_assoc_item(db) && func.self_param(db).is_none() { | 749 | if func.as_assoc_item(db).is_some() && func.self_param(db).is_none() { |
750 | h |= HighlightModifier::Static; | 750 | h |= HighlightModifier::Static; |
751 | } | 751 | } |
752 | return h; | 752 | return h; |