From e2c1da36f59cd99d4da4c1d5f8f323626d3dbe61 Mon Sep 17 00:00:00 2001 From: Jonas Schievink Date: Sat, 10 Apr 2021 23:12:02 +0200 Subject: Support macros in pattern position --- crates/hir_expand/src/db.rs | 1 + 1 file changed, 1 insertion(+) (limited to 'crates/hir_expand') diff --git a/crates/hir_expand/src/db.rs b/crates/hir_expand/src/db.rs index 10fe60821..ca705ee9d 100644 --- a/crates/hir_expand/src/db.rs +++ b/crates/hir_expand/src/db.rs @@ -439,6 +439,7 @@ fn to_fragment_kind(db: &dyn AstDatabase, id: MacroCallId) -> FragmentKind { match parent.kind() { MACRO_ITEMS | SOURCE_FILE => FragmentKind::Items, MACRO_STMTS => FragmentKind::Statements, + MACRO_PAT => FragmentKind::Pattern, ITEM_LIST => FragmentKind::Items, LET_STMT => { // FIXME: Handle LHS Pattern -- cgit v1.2.3