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.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/hir-def/src/macro_expansion_tests/mod.rs b/crates/hir-def/src/macro_expansion_tests/mod.rs
index 88f41274e4..c53a7321e8 100644
--- a/crates/hir-def/src/macro_expansion_tests/mod.rs
+++ b/crates/hir-def/src/macro_expansion_tests/mod.rs
@@ -75,7 +75,7 @@ fn check_errors(#[rust_analyzer::rust_fixture] ra_fixture: &str, expect: Expect)
ast_id.file_id.file_id().expect("macros inside macros are not supported");
let ast = editioned_file_id.parse(&db).syntax_node();
- let ast_id_map = db.ast_id_map(ast_id.file_id);
+ let ast_id_map = ast_id.file_id.ast_id_map(&db);
let node = ast_id_map.get_erased(ast_id.value).to_node(&ast);
Some((node.text_range(), errors))
})
@@ -120,7 +120,7 @@ pub fn identity_when_valid(_attr: TokenStream, item: TokenStream) -> TokenStream
let mut expansions = Vec::new();
for macro_call_node in source_file.syntax().descendants().filter_map(ast::MacroCall::cast) {
- let ast_id = db.ast_id_map(source.file_id).ast_id(&macro_call_node);
+ let ast_id = source.file_id.ast_id_map(&db).ast_id(&macro_call_node);
let ast_id = InFile::new(source.file_id, ast_id);
let ptr = InFile::new(source.file_id, AstPtr::new(&macro_call_node));
let macro_call_id = resolve_macro_call_id(&db, def_map, ast_id, ptr)
@@ -476,7 +476,7 @@ m!(g);
.collect();
for macro_call_node in source_file.syntax().descendants().filter_map(ast::MacroCall::cast) {
- let ast_id = db.ast_id_map(source.file_id).ast_id(&macro_call_node);
+ let ast_id = source.file_id.ast_id_map(&db).ast_id(&macro_call_node);
let ast_id = InFile::new(source.file_id, ast_id);
let ptr = InFile::new(source.file_id, AstPtr::new(&macro_call_node));
let macro_call_id = resolve_macro_call_id(&db, def_map, ast_id, ptr)