From 191b1d238fd1594ab74b1ab6a17dbe0430fc6b1a Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Sun, 24 Nov 2019 21:03:24 +0300 Subject: Remove impl_block module --- crates/ra_hir/src/code_model/src.rs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'crates/ra_hir/src/code_model') diff --git a/crates/ra_hir/src/code_model/src.rs b/crates/ra_hir/src/code_model/src.rs index a0e605603..a4e317c20 100644 --- a/crates/ra_hir/src/code_model/src.rs +++ b/crates/ra_hir/src/code_model/src.rs @@ -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 { + self.id.source(db) + } +} impl HasSource for Import { type Ast = Either; -- cgit v1.2.3