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.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/crates/ra_ide/src/syntax_highlighting.rs b/crates/ra_ide/src/syntax_highlighting.rs
index 028b55902..5bb6f9642 100644
--- a/crates/ra_ide/src/syntax_highlighting.rs
+++ b/crates/ra_ide/src/syntax_highlighting.rs
@@ -630,9 +630,10 @@ fn highlight_name(db: &RootDatabase, def: Definition) -> Highlight {
630 }, 630 },
631 Definition::SelfType(_) => HighlightTag::SelfType, 631 Definition::SelfType(_) => HighlightTag::SelfType,
632 Definition::TypeParam(_) => HighlightTag::TypeParam, 632 Definition::TypeParam(_) => HighlightTag::TypeParam,
633 // FIXME: distinguish between locals and parameters
634 Definition::Local(local) => { 633 Definition::Local(local) => {
635 let mut h = Highlight::new(HighlightTag::Local); 634 let tag =
635 if local.is_param(db) { HighlightTag::ValueParam } else { HighlightTag::Local };
636 let mut h = Highlight::new(tag);
636 if local.is_mut(db) || local.ty(db).is_mutable_reference() { 637 if local.is_mut(db) || local.ty(db).is_mutable_reference() {
637 h |= HighlightModifier::Mutable; 638 h |= HighlightModifier::Mutable;
638 } 639 }