diff options
Diffstat (limited to 'crates/ra_hir/src/code_model')
-rw-r--r-- | crates/ra_hir/src/code_model/src.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/crates/ra_hir/src/code_model/src.rs b/crates/ra_hir/src/code_model/src.rs index b7bafe23d..b9d21bdd7 100644 --- a/crates/ra_hir/src/code_model/src.rs +++ b/crates/ra_hir/src/code_model/src.rs | |||
@@ -1,12 +1,11 @@ | |||
1 | //! FIXME: write short doc here | 1 | //! FIXME: write short doc here |
2 | 2 | ||
3 | use hir_def::{HasChildSource, HasSource as _, Lookup, VariantId}; | 3 | use hir_def::{AstItemDef, HasChildSource, HasSource as _, Lookup, VariantId}; |
4 | use hir_expand::either::Either; | 4 | use hir_expand::either::Either; |
5 | use ra_syntax::ast::{self, AstNode}; | 5 | use ra_syntax::ast::{self, AstNode}; |
6 | 6 | ||
7 | use crate::{ | 7 | use crate::{ |
8 | db::{DefDatabase, HirDatabase}, | 8 | db::{DefDatabase, HirDatabase}, |
9 | ids::AstItemDef, | ||
10 | Const, Enum, EnumVariant, FieldSource, Function, HasBody, Import, MacroDef, Module, | 9 | Const, Enum, EnumVariant, FieldSource, Function, HasBody, Import, MacroDef, Module, |
11 | ModuleSource, Static, Struct, StructField, Trait, TypeAlias, Union, | 10 | ModuleSource, Static, Struct, StructField, Trait, TypeAlias, Union, |
12 | }; | 11 | }; |
@@ -89,7 +88,7 @@ impl HasSource for Const { | |||
89 | impl HasSource for Static { | 88 | impl HasSource for Static { |
90 | type Ast = ast::StaticDef; | 89 | type Ast = ast::StaticDef; |
91 | fn source(self, db: &impl DefDatabase) -> Source<ast::StaticDef> { | 90 | fn source(self, db: &impl DefDatabase) -> Source<ast::StaticDef> { |
92 | self.id.source(db) | 91 | self.id.lookup(db).source(db) |
93 | } | 92 | } |
94 | } | 93 | } |
95 | impl HasSource for Trait { | 94 | impl HasSource for Trait { |