mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 05:45:12 +00:00
fix: treat enum variants as generic item on their own
This commit is contained in:
parent
7556f74b16
commit
e0a161b2e3
2 changed files with 12 additions and 10 deletions
|
@ -192,9 +192,7 @@ impl TyBuilder<()> {
|
|||
parent_subst: Option<Substitution>,
|
||||
) -> TyBuilder<()> {
|
||||
let generics = generics(db.upcast(), def.into());
|
||||
// FIXME: this assertion should hold but some adjustment around
|
||||
// `ValueTyDefId::EnumVariantId` is needed.
|
||||
// assert!(generics.parent_generics().is_some() == parent_subst.is_some());
|
||||
assert!(generics.parent_generics().is_some() == parent_subst.is_some());
|
||||
let params = generics
|
||||
.iter_self()
|
||||
.map(|(id, data)| match data {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue