diff options
| author | bors <bors@rust-lang.org> | 2024-03-22 12:29:42 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-03-22 12:29:42 +0000 |
| commit | 1447f9d38ca388ca178a544534b3cff72945fa1e (patch) | |
| tree | 51b4cffdfe26ba21cda4793ce8dbe20d5f06c965 /compiler/rustc_ast_lowering/src | |
| parent | eff958c59e8c07ba0515e164b825c9001b242294 (diff) | |
| parent | a5de4fb2a585d0d69f62abd1f1765fef430786d9 (diff) | |
| download | rust-1447f9d38ca388ca178a544534b3cff72945fa1e.tar.gz rust-1447f9d38ca388ca178a544534b3cff72945fa1e.zip | |
Auto merge of #122869 - matthiaskrgr:rollup-0navj4l, r=matthiaskrgr
Rollup of 9 pull requests Successful merges: - #121619 (Experimental feature postfix match) - #122370 (Gracefully handle `AnonConst` in `diagnostic_hir_wf_check()`) - #122537 (interpret/allocation: fix aliasing issue in interpreter and refactor getters a bit) - #122542 (coverage: Clean up marker statements that aren't needed later) - #122800 (Add `NonNull::<[T]>::is_empty`.) - #122820 (Stop using `<DefId as Ord>` in various diagnostic situations) - #122847 (Suggest `RUST_MIN_STACK` workaround on overflow) - #122855 (Fix Itanium mangling usizes) - #122863 (add more ice tests ) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_ast_lowering/src')
| -rw-r--r-- | compiler/rustc_ast_lowering/src/expr.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/compiler/rustc_ast_lowering/src/expr.rs b/compiler/rustc_ast_lowering/src/expr.rs index d802dbbcb9e..389cf4e3132 100644 --- a/compiler/rustc_ast_lowering/src/expr.rs +++ b/compiler/rustc_ast_lowering/src/expr.rs @@ -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 { |
