From f9c1336873d65805ad34129939d800dbf59daf61 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Thu, 15 Oct 2020 17:18:07 +0200 Subject: More clarifications --- crates/ide/src/syntax_highlighting.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'crates/ide/src/syntax_highlighting.rs') diff --git a/crates/ide/src/syntax_highlighting.rs b/crates/ide/src/syntax_highlighting.rs index 4d8cd98c7..928f771a9 100644 --- a/crates/ide/src/syntax_highlighting.rs +++ b/crates/ide/src/syntax_highlighting.rs @@ -459,9 +459,9 @@ fn highlight_element( highlight_def(db, def) | HighlightModifier::Definition } Some(NameClass::ConstReference(def)) => highlight_def(db, def), - Some(NameClass::PatFieldShorthand { field, .. }) => { + Some(NameClass::PatFieldShorthand { field_ref, .. }) => { let mut h = HighlightTag::Field.into(); - if let Definition::Field(field) = field { + if let Definition::Field(field) = field_ref { if let VariantDef::Union(_) = field.parent_def(db) { h |= HighlightModifier::Unsafe; } -- cgit v1.2.3