aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide/src/syntax_highlighting.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_ide/src/syntax_highlighting.rs')
-rw-r--r--crates/ra_ide/src/syntax_highlighting.rs24
1 files changed, 12 insertions, 12 deletions
diff --git a/crates/ra_ide/src/syntax_highlighting.rs b/crates/ra_ide/src/syntax_highlighting.rs
index d456d5d36..e3a96f9d5 100644
--- a/crates/ra_ide/src/syntax_highlighting.rs
+++ b/crates/ra_ide/src/syntax_highlighting.rs
@@ -464,7 +464,7 @@ fn highlight_element(
464 let db = sema.db; 464 let db = sema.db;
465 let mut binding_hash = None; 465 let mut binding_hash = None;
466 let highlight: Highlight = match element.kind() { 466 let highlight: Highlight = match element.kind() {
467 FN_DEF => { 467 FN => {
468 bindings_shadow_count.clear(); 468 bindings_shadow_count.clear();
469 return None; 469 return None;
470 } 470 }
@@ -647,7 +647,7 @@ fn highlight_element(
647 647
648fn is_child_of_impl(element: &SyntaxElement) -> bool { 648fn is_child_of_impl(element: &SyntaxElement) -> bool {
649 match element.parent() { 649 match element.parent() {
650 Some(e) => e.kind() == IMPL_DEF, 650 Some(e) => e.kind() == IMPL,
651 _ => false, 651 _ => false,
652 } 652 }
653} 653}
@@ -705,18 +705,18 @@ fn highlight_name_by_syntax(name: ast::Name) -> Highlight {
705 }; 705 };
706 706
707 let tag = match parent.kind() { 707 let tag = match parent.kind() {
708 STRUCT_DEF => HighlightTag::Struct, 708 STRUCT => HighlightTag::Struct,
709 ENUM_DEF => HighlightTag::Enum, 709 ENUM => HighlightTag::Enum,
710 UNION_DEF => HighlightTag::Union, 710 UNION => HighlightTag::Union,
711 TRAIT_DEF => HighlightTag::Trait, 711 TRAIT => HighlightTag::Trait,
712 TYPE_ALIAS_DEF => HighlightTag::TypeAlias, 712 TYPE_ALIAS => HighlightTag::TypeAlias,
713 TYPE_PARAM => HighlightTag::TypeParam, 713 TYPE_PARAM => HighlightTag::TypeParam,
714 RECORD_FIELD_DEF => HighlightTag::Field, 714 RECORD_FIELD => HighlightTag::Field,
715 MODULE => HighlightTag::Module, 715 MODULE => HighlightTag::Module,
716 FN_DEF => HighlightTag::Function, 716 FN => HighlightTag::Function,
717 CONST_DEF => HighlightTag::Constant, 717 CONST => HighlightTag::Constant,
718 STATIC_DEF => HighlightTag::Static, 718 STATIC => HighlightTag::Static,
719 ENUM_VARIANT => HighlightTag::EnumVariant, 719 VARIANT => HighlightTag::EnumVariant,
720 BIND_PAT => HighlightTag::Local, 720 BIND_PAT => HighlightTag::Local,
721 _ => default, 721 _ => default,
722 }; 722 };