Expand macros in blocks to expressions for now

Expanding to statements isn't handled properly yet and breaks things.
This commit is contained in:
Florian Diebold 2019-12-08 12:50:49 +01:00
parent 2223620313
commit 5e096def15
2 changed files with 6 additions and 5 deletions

View file

@ -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,