From 5da1dc9a8b6b568add92c30dca0341328c138b31 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Wed, 19 Aug 2020 17:30:43 +0200 Subject: Better name --- crates/ide/src/syntax_highlighting.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'crates/ide') diff --git a/crates/ide/src/syntax_highlighting.rs b/crates/ide/src/syntax_highlighting.rs index 5521fd2b1..a87a9be7e 100644 --- a/crates/ide/src/syntax_highlighting.rs +++ b/crates/ide/src/syntax_highlighting.rs @@ -496,9 +496,9 @@ fn highlight_element( match name_kind { Some(NameClass::ExternCrate(_)) => HighlightTag::Module.into(), Some(NameClass::Definition(def)) => { - highlight_name(sema, db, def, None, false) | HighlightModifier::Definition + highlight_def(sema, db, def, None, false) | HighlightModifier::Definition } - Some(NameClass::ConstReference(def)) => highlight_name(sema, db, def, None, false), + Some(NameClass::ConstReference(def)) => highlight_def(sema, db, def, None, false), Some(NameClass::FieldShorthand { field, .. }) => { let mut h = HighlightTag::Field.into(); if let Definition::Field(field) = field { @@ -532,7 +532,7 @@ fn highlight_element( binding_hash = Some(calc_binding_hash(&name, *shadow_count)) } }; - highlight_name(sema, db, def, Some(name_ref), possibly_unsafe) + highlight_def(sema, db, def, Some(name_ref), possibly_unsafe) } NameRefClass::FieldShorthand { .. } => HighlightTag::Field.into(), }, @@ -737,7 +737,7 @@ fn highlight_method_call( Some(h) } -fn highlight_name( +fn highlight_def( sema: &Semantics, db: &RootDatabase, def: Definition, -- cgit v1.2.3