Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 1447f9d

Browse files
committedMar 22, 2024
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
2 parents eff958c + a5de4fb commit 1447f9d

File tree

73 files changed

+1200
-248
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+1200
-248
lines changed
 

‎Cargo.lock

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4236,6 +4236,7 @@ name = "rustc_middle"
42364236
version = "0.0.0"
42374237
dependencies = [
42384238
"bitflags 2.4.2",
4239+
"derivative",
42394240
"either",
42404241
"field-offset",
42414242
"gsgdt",

‎compiler/rustc_ast/src/ast.rs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1437,7 +1437,7 @@ pub enum ExprKind {
14371437
/// `'label: loop { block }`
14381438
Loop(P<Block>, Option<Label>, Span),
14391439
/// A `match` block.
1440-
Match(P<Expr>, ThinVec<Arm>),
1440+
Match(P<Expr>, ThinVec<Arm>, MatchKind),
14411441
/// A closure (e.g., `move |a, b, c| a + b + c`).
14421442
Closure(Box<Closure>),
14431443
/// A block (`'label: { ... }`).
@@ -1762,6 +1762,15 @@ pub enum StrStyle {
17621762
Raw(u8),
17631763
}
17641764

1765+
/// The kind of match expression
1766+
#[derive(Clone, Copy, Encodable, Decodable, Debug, PartialEq)]
1767+
pub enum MatchKind {
1768+
/// match expr { ... }
1769+
Prefix,
1770+
/// expr.match { ... }
1771+
Postfix,
1772+
}
1773+
17651774
/// A literal in a meta item.
17661775
#[derive(Clone, Encodable, Decodable, Debug, HashStable_Generic)]
17671776
pub struct MetaItemLit {

0 commit comments

Comments
 (0)
Please sign in to comment.