mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 20:42:04 +00:00
Properly support IDE functionality in enum variants
This commit is contained in:
parent
14400785ac
commit
7ec9ffa325
3 changed files with 7 additions and 3 deletions
|
@ -384,7 +384,7 @@ impl SourceToDefCtx<'_, '_> {
|
|||
} else {
|
||||
let it = ast::Variant::cast(container.value)?;
|
||||
let def = self.enum_variant_to_def(InFile::new(container.file_id, it))?;
|
||||
VariantId::from(def).into()
|
||||
DefWithBodyId::from(def).into()
|
||||
};
|
||||
Some(cont)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue