Add postfix match MatchSource to HIR
This commit is contained in:
parent
d4ba888787
commit
567c98b30f
4 changed files with 10 additions and 3 deletions
|
@ -181,10 +181,13 @@ impl<'hir> LoweringContext<'_, 'hir> {
|
|||
)
|
||||
}),
|
||||
ExprKind::TryBlock(body) => self.lower_expr_try_block(body),
|
||||
ExprKind::Match(expr, arms, _) => hir::ExprKind::Match(
|
||||
ExprKind::Match(expr, arms, kind) => hir::ExprKind::Match(
|
||||
self.lower_expr(expr),
|
||||
self.arena.alloc_from_iter(arms.iter().map(|x| self.lower_arm(x))),
|
||||
hir::MatchSource::Normal,
|
||||
match kind {
|
||||
MatchKind::Prefix => hir::MatchSource::Normal,
|
||||
MatchKind::Postfix => hir::MatchSource::Postfix,
|
||||
},
|
||||
),
|
||||
ExprKind::Await(expr, await_kw_span) => self.lower_expr_await(*await_kw_span, expr),
|
||||
ExprKind::Closure(box Closure {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue