aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_ty/src/test_db.rs
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2021-01-25 14:22:24 +0000
committerGitHub <[email protected]>2021-01-25 14:22:24 +0000
commit2c735ed734be9b9041921478e0049fffd7160f78 (patch)
tree724e39e3933126ee3129c3e4e0c971b443221afd /crates/hir_ty/src/test_db.rs
parent0a6b2b784618ffbc7775e9a3e3aaf42689bb2962 (diff)
parent5c241b07666bc7b29e97b8206e505944775266a0 (diff)
Merge #7426
7426: Create all `ModuleId`s through a `DefMap` method r=jonas-schievink a=jonas-schievink `ModuleId` needs to be able to represent blocks, and only the associated `DefMap` will know how to construct that `ModuleId` bors r+ Co-authored-by: Jonas Schievink <[email protected]>
Diffstat (limited to 'crates/hir_ty/src/test_db.rs')
-rw-r--r--crates/hir_ty/src/test_db.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/hir_ty/src/test_db.rs b/crates/hir_ty/src/test_db.rs
index 09696fcf4..381b98ba8 100644
--- a/crates/hir_ty/src/test_db.rs
+++ b/crates/hir_ty/src/test_db.rs
@@ -83,7 +83,7 @@ impl TestDB {
83 let crate_def_map = self.crate_def_map(krate); 83 let crate_def_map = self.crate_def_map(krate);
84 for (local_id, data) in crate_def_map.modules() { 84 for (local_id, data) in crate_def_map.modules() {
85 if data.origin.file_id() == Some(file_id) { 85 if data.origin.file_id() == Some(file_id) {
86 return ModuleId::top_level(krate, local_id); 86 return crate_def_map.module_id(local_id);
87 } 87 }
88 } 88 }
89 } 89 }