diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2021-04-08 19:43:41 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2021-04-08 19:43:41 +0100 |
commit | 51e5316de57939a98e33504ac23344f14240b6dc (patch) | |
tree | 3403086d9e04417e92b0c3ad2af09151e698a3c5 /crates/hir_def/src/lib.rs | |
parent | 5f279d57f0cba600eae8c550654a00b4268812ac (diff) | |
parent | 86b7861612ba074120dfb6bd32c80c569688748d (diff) |
Merge #8428
8428: Use named fields in `MacroCallKind` r=jonas-schievink a=jonas-schievink
bors r+
changelog skip
Co-authored-by: Jonas Schievink <[email protected]>
Diffstat (limited to 'crates/hir_def/src/lib.rs')
-rw-r--r-- | crates/hir_def/src/lib.rs | 9 |
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) |