Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir-def/src/nameres/attr_resolution.rs')
| -rw-r--r-- | crates/hir-def/src/nameres/attr_resolution.rs | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/crates/hir-def/src/nameres/attr_resolution.rs b/crates/hir-def/src/nameres/attr_resolution.rs index e2d83c8e3b..eb7f4c05ae 100644 --- a/crates/hir-def/src/nameres/attr_resolution.rs +++ b/crates/hir-def/src/nameres/attr_resolution.rs @@ -3,7 +3,7 @@ use base_db::CrateId; use hir_expand::{ attrs::{Attr, AttrId, AttrInput}, - AstId, MacroCallId, MacroCallKind, MacroDefId, + MacroCallId, MacroCallKind, MacroDefId, }; use span::SyntaxContextId; use syntax::{ast, SmolStr}; @@ -98,20 +98,7 @@ impl DefMap { false } } -pub(super) fn derive_attr_macro_as_call_id( - db: &dyn DefDatabase, - item_attr: &AstId<ast::Adt>, - macro_attr: &Attr, - krate: CrateId, - def: MacroDefId, -) -> MacroCallId { - def.make_call( - db.upcast(), - krate, - MacroCallKind::DeriveAttr { ast_id: *item_attr, invoc_attr_index: macro_attr.id }, - macro_attr.ctxt, - ) -} + pub(super) fn attr_macro_as_call_id( db: &dyn DefDatabase, item_attr: &AstIdWithPath<ast::Item>, |