mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 04:44:57 +00:00
More clarifications
This commit is contained in:
parent
bc287b8f9b
commit
f9c1336873
6 changed files with 17 additions and 17 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue