mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 12:29:21 +00:00
Move enum&union to new loc
This commit is contained in:
parent
f135a8ea55
commit
56710f119b
14 changed files with 123 additions and 79 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue