aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/code_model/src.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir/src/code_model/src.rs')
-rw-r--r--crates/ra_hir/src/code_model/src.rs5
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
3use hir_def::{HasChildSource, HasSource as _, Lookup, VariantId}; 3use hir_def::{AstItemDef, HasChildSource, HasSource as _, Lookup, VariantId};
4use hir_expand::either::Either; 4use hir_expand::either::Either;
5use ra_syntax::ast::{self, AstNode}; 5use ra_syntax::ast::{self, AstNode};
6 6
7use crate::{ 7use 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 {
89impl HasSource for Static { 88impl 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}
95impl HasSource for Trait { 94impl HasSource for Trait {