Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir-def/src/expander.rs')
| -rw-r--r-- | crates/hir-def/src/expander.rs | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/crates/hir-def/src/expander.rs b/crates/hir-def/src/expander.rs index 6d8b4445f7..57bd54ed17 100644 --- a/crates/hir-def/src/expander.rs +++ b/crates/hir-def/src/expander.rs @@ -69,9 +69,12 @@ impl Expander { let result = self.within_limit(db, |this| { let macro_call = this.in_file(¯o_call); - match macro_call.as_call_id_with_errors(db.upcast(), this.module.krate(), |path| { - resolver(path).map(|it| db.macro_def(it)) - }) { + match macro_call.as_call_id( + db.upcast(), + this.module, + |path| resolver(path).map(|it| db.macro_def(it)), + |module| this.module.def_map(db).path_for_module(db, module), + ) { Ok(call_id) => call_id, Err(resolve_err) => { unresolved_macro_err = Some(resolve_err); |