mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 04:44:57 +00:00
Highlight declarations and references for both defs in field shorthands
This commit is contained in:
parent
ced65f77c4
commit
631bca786f
2 changed files with 74 additions and 31 deletions
|
@ -118,10 +118,7 @@ pub(crate) fn find_def(
|
|||
_ => None,
|
||||
})
|
||||
.or_else(|| {
|
||||
NameClass::classify_lifetime(sema, &lifetime).and_then(|class| match class {
|
||||
NameClass::Definition(it) => Some(it),
|
||||
_ => None,
|
||||
})
|
||||
NameClass::classify_lifetime(sema, &lifetime).and_then(NameClass::defined)
|
||||
})?,
|
||||
};
|
||||
Some(def)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue