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
|
@ -377,10 +377,10 @@ impl ModuleDef {
|
|||
ModuleDef::Function(it) => Some(it.into()),
|
||||
ModuleDef::Const(it) => Some(it.into()),
|
||||
ModuleDef::Static(it) => Some(it.into()),
|
||||
ModuleDef::Variant(it) => Some(it.into()),
|
||||
|
||||
ModuleDef::Module(_)
|
||||
| ModuleDef::Adt(_)
|
||||
| ModuleDef::Variant(_)
|
||||
| ModuleDef::Trait(_)
|
||||
| ModuleDef::TypeAlias(_)
|
||||
| ModuleDef::Macro(_)
|
||||
|
@ -1160,7 +1160,7 @@ pub enum DefWithBody {
|
|||
Const(Const),
|
||||
Variant(Variant),
|
||||
}
|
||||
impl_from!(Function, Const, Static for DefWithBody);
|
||||
impl_from!(Function, Const, Static, Variant for DefWithBody);
|
||||
|
||||
impl DefWithBody {
|
||||
pub fn module(self, db: &dyn HirDatabase) -> Module {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue