aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/code_model
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir/src/code_model')
-rw-r--r--crates/ra_hir/src/code_model/src.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_hir/src/code_model/src.rs b/crates/ra_hir/src/code_model/src.rs
index 076d86f2b..bf3ee0834 100644
--- a/crates/ra_hir/src/code_model/src.rs
+++ b/crates/ra_hir/src/code_model/src.rs
@@ -22,7 +22,7 @@ impl Module {
22 /// Returns a node which defines this module. That is, a file or a `mod foo {}` with items. 22 /// Returns a node which defines this module. That is, a file or a `mod foo {}` with items.
23 pub fn definition_source(self, db: &impl DefDatabase) -> Source<ModuleSource> { 23 pub fn definition_source(self, db: &impl DefDatabase) -> Source<ModuleSource> {
24 let def_map = db.crate_def_map(self.id.krate); 24 let def_map = db.crate_def_map(self.id.krate);
25 let src = def_map[self.id.module_id].definition_source(db); 25 let src = def_map[self.id.local_id].definition_source(db);
26 src.map(|it| match it { 26 src.map(|it| match it {
27 Either::A(it) => ModuleSource::SourceFile(it), 27 Either::A(it) => ModuleSource::SourceFile(it),
28 Either::B(it) => ModuleSource::Module(it), 28 Either::B(it) => ModuleSource::Module(it),
@@ -33,7 +33,7 @@ impl Module {
33 /// `None` for the crate root. 33 /// `None` for the crate root.
34 pub fn declaration_source(self, db: &impl DefDatabase) -> Option<Source<ast::Module>> { 34 pub fn declaration_source(self, db: &impl DefDatabase) -> Option<Source<ast::Module>> {
35 let def_map = db.crate_def_map(self.id.krate); 35 let def_map = db.crate_def_map(self.id.krate);
36 def_map[self.id.module_id].declaration_source(db) 36 def_map[self.id.local_id].declaration_source(db)
37 } 37 }
38} 38}
39 39