aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_def/src/lib.rs
diff options
context:
space:
mode:
authorJonas Schievink <[email protected]>2021-04-08 19:43:07 +0100
committerJonas Schievink <[email protected]>2021-04-08 19:43:07 +0100
commit86b7861612ba074120dfb6bd32c80c569688748d (patch)
tree3403086d9e04417e92b0c3ad2af09151e698a3c5 /crates/hir_def/src/lib.rs
parent5f279d57f0cba600eae8c550654a00b4268812ac (diff)
Use named fields in `MacroCallKind`
Diffstat (limited to 'crates/hir_def/src/lib.rs')
-rw-r--r--crates/hir_def/src/lib.rs9
1 files changed, 7 insertions, 2 deletions
diff --git a/crates/hir_def/src/lib.rs b/crates/hir_def/src/lib.rs
index e2af0e514..b72884925 100644
--- a/crates/hir_def/src/lib.rs
+++ b/crates/hir_def/src/lib.rs
@@ -690,7 +690,9 @@ fn macro_call_as_call_id(
690 ) 690 )
691 .map(MacroCallId::from) 691 .map(MacroCallId::from)
692 } else { 692 } else {
693 Ok(def.as_lazy_macro(db.upcast(), krate, MacroCallKind::FnLike(call.ast_id)).into()) 693 Ok(def
694 .as_lazy_macro(db.upcast(), krate, MacroCallKind::FnLike { ast_id: call.ast_id })
695 .into())
694 }; 696 };
695 Ok(res) 697 Ok(res)
696} 698}
@@ -707,7 +709,10 @@ fn derive_macro_as_call_id(
707 .as_lazy_macro( 709 .as_lazy_macro(
708 db.upcast(), 710 db.upcast(),
709 krate, 711 krate,
710 MacroCallKind::Derive(item_attr.ast_id, last_segment.to_string()), 712 MacroCallKind::Derive {
713 ast_id: item_attr.ast_id,
714 derive_name: last_segment.to_string(),
715 },
711 ) 716 )
712 .into(); 717 .into();
713 Ok(res) 718 Ok(res)