Use Id for variats

This commit is contained in:
Aleksey Kladov 2019-11-27 16:25:01 +03:00
parent 17680f6060
commit 9fa46ff5c6
7 changed files with 60 additions and 52 deletions

View file

@ -534,14 +534,6 @@ impl VariantDef {
}
}
pub(crate) fn field(self, db: &impl HirDatabase, name: &Name) -> Option<StructField> {
match self {
VariantDef::Struct(it) => it.field(db, name),
VariantDef::Union(it) => it.field(db, name),
VariantDef::EnumVariant(it) => it.field(db, name),
}
}
pub fn module(self, db: &impl HirDatabase) -> Module {
match self {
VariantDef::Struct(it) => it.module(db),