diff options
Diffstat (limited to 'crates/ra_hir/src/code_model.rs')
-rw-r--r-- | crates/ra_hir/src/code_model.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_hir/src/code_model.rs b/crates/ra_hir/src/code_model.rs index 962d5a8c1..078bd8609 100644 --- a/crates/ra_hir/src/code_model.rs +++ b/crates/ra_hir/src/code_model.rs | |||
@@ -23,7 +23,7 @@ use ra_syntax::ast::{self, NameOwner, TypeAscriptionOwner}; | |||
23 | use crate::{ | 23 | use crate::{ |
24 | adt::VariantDef, | 24 | adt::VariantDef, |
25 | db::{AstDatabase, DefDatabase, HirDatabase}, | 25 | db::{AstDatabase, DefDatabase, HirDatabase}, |
26 | expr::{validation::ExprValidator, BindingAnnotation, Body, BodySourceMap, Pat, PatId}, | 26 | expr::{BindingAnnotation, Body, BodySourceMap, ExprValidator, Pat, PatId}, |
27 | generics::{GenericDef, HasGenericParams}, | 27 | generics::{GenericDef, HasGenericParams}, |
28 | ids::{ | 28 | ids::{ |
29 | AstItemDef, ConstId, EnumId, FunctionId, MacroDefId, StaticId, StructId, TraitId, | 29 | AstItemDef, ConstId, EnumId, FunctionId, MacroDefId, StaticId, StructId, TraitId, |
@@ -157,7 +157,7 @@ impl Module { | |||
157 | } | 157 | } |
158 | 158 | ||
159 | /// Finds a child module with the specified name. | 159 | /// Finds a child module with the specified name. |
160 | pub fn child(self, db: &impl HirDatabase, name: &Name) -> Option<Module> { | 160 | pub fn child(self, db: &impl DefDatabase, name: &Name) -> Option<Module> { |
161 | let def_map = db.crate_def_map(self.id.krate); | 161 | let def_map = db.crate_def_map(self.id.krate); |
162 | let child_id = def_map[self.id.module_id].children.get(name)?; | 162 | let child_id = def_map[self.id.module_id].children.get(name)?; |
163 | Some(self.with_module_id(*child_id)) | 163 | Some(self.with_module_id(*child_id)) |