Move enum&union to new loc

This commit is contained in:
Aleksey Kladov 2019-12-12 15:11:57 +01:00
parent f135a8ea55
commit 56710f119b
14 changed files with 123 additions and 79 deletions

View file

@ -4,7 +4,7 @@ use either::Either;
use hir_def::{
nameres::ModuleSource,
src::{HasChildSource, HasSource as _},
AstItemDef, Lookup, VariantId,
Lookup, VariantId,
};
use ra_syntax::ast;
@ -57,13 +57,13 @@ impl HasSource for Struct {
impl HasSource for Union {
type Ast = ast::UnionDef;
fn source(self, db: &impl DefDatabase) -> InFile<ast::UnionDef> {
self.id.source(db)
self.id.lookup(db).source(db)
}
}
impl HasSource for Enum {
type Ast = ast::EnumDef;
fn source(self, db: &impl DefDatabase) -> InFile<ast::EnumDef> {
self.id.source(db)
self.id.lookup(db).source(db)
}
}
impl HasSource for EnumVariant {