mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 21:05:02 +00:00
Fix source_to_def for named enum variant fields
This commit is contained in:
parent
636b413e14
commit
468b804856
2 changed files with 21 additions and 0 deletions
|
@ -189,6 +189,10 @@ impl SourceToDefCtx<'_, '_> {
|
|||
let def = self.type_alias_to_def(container.with_value(it))?;
|
||||
def.into()
|
||||
},
|
||||
ast::Variant(it) => {
|
||||
let def = self.enum_variant_to_def(container.with_value(it))?;
|
||||
VariantId::from(def).into()
|
||||
},
|
||||
_ => continue,
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue