From 86b7861612ba074120dfb6bd32c80c569688748d Mon Sep 17 00:00:00 2001 From: Jonas Schievink Date: Thu, 8 Apr 2021 20:43:07 +0200 Subject: Use named fields in `MacroCallKind` --- crates/hir_expand/src/builtin_derive.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'crates/hir_expand/src/builtin_derive.rs') diff --git a/crates/hir_expand/src/builtin_derive.rs b/crates/hir_expand/src/builtin_derive.rs index 6ece4b289..392079ed4 100644 --- a/crates/hir_expand/src/builtin_derive.rs +++ b/crates/hir_expand/src/builtin_derive.rs @@ -308,7 +308,7 @@ $0 let expander = BuiltinDeriveExpander::find_by_name(&name).unwrap(); - let attr_id = AstId::new(file_id.into(), ast_id_map.ast_id(&items[0])); + let ast_id = AstId::new(file_id.into(), ast_id_map.ast_id(&items[0])); let loc = MacroCallLoc { def: MacroDefId { @@ -317,7 +317,7 @@ $0 local_inner: false, }, krate: CrateId(0), - kind: MacroCallKind::Derive(attr_id, name.to_string()), + kind: MacroCallKind::Derive { ast_id, derive_name: name.to_string() }, }; let id: MacroCallId = db.intern_macro(loc).into(); -- cgit v1.2.3