mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-02 06:41:48 +00:00
Remove impl_block module
This commit is contained in:
parent
d87c16bea6
commit
191b1d238f
4 changed files with 43 additions and 55 deletions
|
@ -5,8 +5,8 @@ use hir_expand::either::Either;
|
|||
use ra_syntax::ast;
|
||||
|
||||
use crate::{
|
||||
db::DefDatabase, Const, Enum, EnumVariant, FieldSource, Function, Import, MacroDef, Module,
|
||||
ModuleSource, Static, Struct, StructField, Trait, TypeAlias, Union,
|
||||
db::DefDatabase, Const, Enum, EnumVariant, FieldSource, Function, ImplBlock, Import, MacroDef,
|
||||
Module, ModuleSource, Static, Struct, StructField, Trait, TypeAlias, Union,
|
||||
};
|
||||
|
||||
pub use hir_expand::Source;
|
||||
|
@ -108,6 +108,12 @@ impl HasSource for MacroDef {
|
|||
Source { file_id: self.id.ast_id.file_id(), value: self.id.ast_id.to_node(db) }
|
||||
}
|
||||
}
|
||||
impl HasSource for ImplBlock {
|
||||
type Ast = ast::ImplBlock;
|
||||
fn source(self, db: &impl DefDatabase) -> Source<ast::ImplBlock> {
|
||||
self.id.source(db)
|
||||
}
|
||||
}
|
||||
impl HasSource for Import {
|
||||
type Ast = Either<ast::UseTree, ast::ExternCrateItem>;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue