Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir-def/src/lib.rs')
-rw-r--r--crates/hir-def/src/lib.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/crates/hir-def/src/lib.rs b/crates/hir-def/src/lib.rs
index 0dd0a5861e..56603f4b15 100644
--- a/crates/hir-def/src/lib.rs
+++ b/crates/hir-def/src/lib.rs
@@ -934,11 +934,11 @@ fn derive_macro_as_call_id(
derive_attr: AttrId,
derive_pos: u32,
krate: CrateId,
- resolver: impl Fn(path::ModPath) -> Option<MacroDefId>,
-) -> Result<MacroCallId, UnresolvedMacro> {
- let def: MacroDefId = resolver(item_attr.path.clone())
+ resolver: impl Fn(path::ModPath) -> Option<(MacroId, MacroDefId)>,
+) -> Result<(MacroId, MacroDefId, MacroCallId), UnresolvedMacro> {
+ let (macro_id, def_id) = resolver(item_attr.path.clone())
.ok_or_else(|| UnresolvedMacro { path: item_attr.path.clone() })?;
- let res = def.as_lazy_macro(
+ let call_id = def_id.as_lazy_macro(
db.upcast(),
krate,
MacroCallKind::Derive {
@@ -947,7 +947,7 @@ fn derive_macro_as_call_id(
derive_attr_index: derive_attr.ast_index,
},
);
- Ok(res)
+ Ok((macro_id, def_id, call_id))
}
fn attr_macro_as_call_id(