Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir-def/src/macro_expansion_tests/mod.rs')
-rw-r--r--crates/hir-def/src/macro_expansion_tests/mod.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/crates/hir-def/src/macro_expansion_tests/mod.rs b/crates/hir-def/src/macro_expansion_tests/mod.rs
index c63f2c1d78..8317c56caf 100644
--- a/crates/hir-def/src/macro_expansion_tests/mod.rs
+++ b/crates/hir-def/src/macro_expansion_tests/mod.rs
@@ -45,6 +45,7 @@ use tt::{TextRange, TextSize};
use crate::{
AdtId, Lookup, ModuleDefId,
db::DefDatabase,
+ expr_store::Body,
nameres::{DefMap, ModuleSource, crate_def_map},
src::HasSource,
test_db::TestDB,
@@ -276,7 +277,7 @@ fn resolve_macro_call_id(
_ => continue,
};
- let (body, sm) = db.body_with_source_map(body);
+ let (body, sm) = Body::with_source_map(db, body);
if let Some(it) = body
.blocks(db)
.find_map(|block| resolve_macro_call_id(db, block.1, ast_id, ast_ptr))
@@ -458,7 +459,7 @@ m!(g);
"#;
let (db, file_id) = TestDB::with_single_file(fixture);
- let krate = file_id.krate(&db);
+ let krate = db.test_crate();
let def_map = crate_def_map(&db, krate);
let source = def_map[def_map.root].definition_source(&db);
let source_file = match source.value {