diff --git a/crates/ide/src/syntax_highlighting/highlight.rs b/crates/ide/src/syntax_highlighting/highlight.rs index d0fecc6956f..19baf5d20d3 100644 --- a/crates/ide/src/syntax_highlighting/highlight.rs +++ b/crates/ide/src/syntax_highlighting/highlight.rs @@ -489,7 +489,8 @@ fn highlight_def(db: &RootDatabase, krate: Option, def: Definition) let ty = local.ty(db); if local.is_mut(db) || ty.is_mutable_reference() { h |= HlMod::Mutable; - } else if local.is_ref(db) || ty.is_reference() { + } + if local.is_ref(db) || ty.is_reference() { h |= HlMod::Reference; } if ty.as_callable(db).is_some() || ty.impls_fnonce(db) {