From 5e096def15e992938b0e2838ae6c344939aa10f2 Mon Sep 17 00:00:00 2001 From: Florian Diebold Date: Sun, 8 Dec 2019 12:50:49 +0100 Subject: Expand macros in blocks to expressions for now Expanding to statements isn't handled properly yet and breaks things. --- crates/ra_hir_expand/src/db.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'crates/ra_hir_expand/src/db.rs') diff --git a/crates/ra_hir_expand/src/db.rs b/crates/ra_hir_expand/src/db.rs index 4bdb41619..f68aca789 100644 --- a/crates/ra_hir_expand/src/db.rs +++ b/crates/ra_hir_expand/src/db.rs @@ -183,8 +183,8 @@ fn to_fragment_kind(db: &dyn AstDatabase, macro_call_id: MacroCallId) -> Fragmen // FIXME: Handle Pattern FragmentKind::Expr } - EXPR_STMT => FragmentKind::Statements, - BLOCK => FragmentKind::Statements, + // FIXME: Expand to statements in appropriate positions; HIR lowering needs to handle that + EXPR_STMT | BLOCK => FragmentKind::Expr, ARG_LIST => FragmentKind::Expr, TRY_EXPR => FragmentKind::Expr, TUPLE_EXPR => FragmentKind::Expr, -- cgit v1.2.3