diff options
Diffstat (limited to 'crates/hir_ty/src/tests.rs')
-rw-r--r-- | crates/hir_ty/src/tests.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/hir_ty/src/tests.rs b/crates/hir_ty/src/tests.rs index 4a3fcea8d..25ee664d6 100644 --- a/crates/hir_ty/src/tests.rs +++ b/crates/hir_ty/src/tests.rs | |||
@@ -188,10 +188,10 @@ fn infer_with_mismatches(content: &str, include_mismatches: bool) -> String { | |||
188 | }; | 188 | }; |
189 | 189 | ||
190 | let module = db.module_for_file(file_id); | 190 | let module = db.module_for_file(file_id); |
191 | let crate_def_map = db.crate_def_map(module.krate); | 191 | let def_map = module.def_map(&db); |
192 | 192 | ||
193 | let mut defs: Vec<DefWithBodyId> = Vec::new(); | 193 | let mut defs: Vec<DefWithBodyId> = Vec::new(); |
194 | visit_module(&db, &crate_def_map, module.local_id, &mut |it| defs.push(it)); | 194 | visit_module(&db, &def_map, module.local_id, &mut |it| defs.push(it)); |
195 | defs.sort_by_key(|def| match def { | 195 | defs.sort_by_key(|def| match def { |
196 | DefWithBodyId::FunctionId(it) => { | 196 | DefWithBodyId::FunctionId(it) => { |
197 | let loc = it.lookup(&db); | 197 | let loc = it.lookup(&db); |
@@ -321,7 +321,7 @@ fn typing_whitespace_inside_a_function_should_not_invalidate_types() { | |||
321 | { | 321 | { |
322 | let events = db.log_executed(|| { | 322 | let events = db.log_executed(|| { |
323 | let module = db.module_for_file(pos.file_id); | 323 | let module = db.module_for_file(pos.file_id); |
324 | let crate_def_map = db.crate_def_map(module.krate); | 324 | let crate_def_map = module.def_map(&db); |
325 | visit_module(&db, &crate_def_map, module.local_id, &mut |def| { | 325 | visit_module(&db, &crate_def_map, module.local_id, &mut |def| { |
326 | db.infer(def); | 326 | db.infer(def); |
327 | }); | 327 | }); |