aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_def/src/body
diff options
context:
space:
mode:
Diffstat (limited to 'crates/hir_def/src/body')
-rw-r--r--crates/hir_def/src/body/tests.rs7
1 files changed, 3 insertions, 4 deletions
diff --git a/crates/hir_def/src/body/tests.rs b/crates/hir_def/src/body/tests.rs
index 404603360..a92134ba7 100644
--- a/crates/hir_def/src/body/tests.rs
+++ b/crates/hir_def/src/body/tests.rs
@@ -34,7 +34,7 @@ fn check_diagnostics(ra_fixture: &str) {
34 db.check_diagnostics(); 34 db.check_diagnostics();
35} 35}
36 36
37fn block_def_map_at(ra_fixture: &str) -> Arc<DefMap> { 37fn block_def_map_at(ra_fixture: &str) -> String {
38 let (db, position) = crate::test_db::TestDB::with_position(ra_fixture); 38 let (db, position) = crate::test_db::TestDB::with_position(ra_fixture);
39 39
40 let krate = db.crate_graph().iter().next().unwrap(); 40 let krate = db.crate_graph().iter().next().unwrap();
@@ -51,7 +51,7 @@ fn block_def_map_at(ra_fixture: &str) -> Arc<DefMap> {
51 block = new_block; 51 block = new_block;
52 } 52 }
53 None => { 53 None => {
54 return def_map; 54 return def_map.dump(&db);
55 } 55 }
56 } 56 }
57 } 57 }
@@ -138,8 +138,7 @@ fn block_at_pos(db: &dyn DefDatabase, def_map: &DefMap, position: FilePosition)
138} 138}
139 139
140fn check_at(ra_fixture: &str, expect: Expect) { 140fn check_at(ra_fixture: &str, expect: Expect) {
141 let def_map = block_def_map_at(ra_fixture); 141 let actual = block_def_map_at(ra_fixture);
142 let actual = def_map.dump();
143 expect.assert_eq(&actual); 142 expect.assert_eq(&actual);
144} 143}
145 144