aboutsummaryrefslogtreecommitdiff
path: root/crates/ide
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2020-08-19 16:30:43 +0100
committerAleksey Kladov <[email protected]>2020-08-19 16:30:43 +0100
commit5da1dc9a8b6b568add92c30dca0341328c138b31 (patch)
treeb8139bd36dd487e2e1df7fbe80fb48fc41f15afc /crates/ide
parenta4b7ce94bacbb8a9da28111fba0abeb2a68e9bc2 (diff)
Better name
Diffstat (limited to 'crates/ide')
-rw-r--r--crates/ide/src/syntax_highlighting.rs8
1 files changed, 4 insertions, 4 deletions
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(
496 match name_kind { 496 match name_kind {
497 Some(NameClass::ExternCrate(_)) => HighlightTag::Module.into(), 497 Some(NameClass::ExternCrate(_)) => HighlightTag::Module.into(),
498 Some(NameClass::Definition(def)) => { 498 Some(NameClass::Definition(def)) => {
499 highlight_name(sema, db, def, None, false) | HighlightModifier::Definition 499 highlight_def(sema, db, def, None, false) | HighlightModifier::Definition
500 } 500 }
501 Some(NameClass::ConstReference(def)) => highlight_name(sema, db, def, None, false), 501 Some(NameClass::ConstReference(def)) => highlight_def(sema, db, def, None, false),
502 Some(NameClass::FieldShorthand { field, .. }) => { 502 Some(NameClass::FieldShorthand { field, .. }) => {
503 let mut h = HighlightTag::Field.into(); 503 let mut h = HighlightTag::Field.into();
504 if let Definition::Field(field) = field { 504 if let Definition::Field(field) = field {
@@ -532,7 +532,7 @@ fn highlight_element(
532 binding_hash = Some(calc_binding_hash(&name, *shadow_count)) 532 binding_hash = Some(calc_binding_hash(&name, *shadow_count))
533 } 533 }
534 }; 534 };
535 highlight_name(sema, db, def, Some(name_ref), possibly_unsafe) 535 highlight_def(sema, db, def, Some(name_ref), possibly_unsafe)
536 } 536 }
537 NameRefClass::FieldShorthand { .. } => HighlightTag::Field.into(), 537 NameRefClass::FieldShorthand { .. } => HighlightTag::Field.into(),
538 }, 538 },
@@ -737,7 +737,7 @@ fn highlight_method_call(
737 Some(h) 737 Some(h)
738} 738}
739 739
740fn highlight_name( 740fn highlight_def(
741 sema: &Semantics<RootDatabase>, 741 sema: &Semantics<RootDatabase>,
742 db: &RootDatabase, 742 db: &RootDatabase,
743 def: Definition, 743 def: Definition,