1
Fork 0

Add postfix match MatchSource to HIR

This commit is contained in:
Ross Smyth 2024-03-02 20:55:48 -05:00
parent d4ba888787
commit 567c98b30f
4 changed files with 10 additions and 3 deletions

View file

@ -2004,6 +2004,8 @@ pub enum LocalSource {
pub enum MatchSource {
/// A `match _ { .. }`.
Normal,
/// A `expr.match { .. }`.
Postfix,
/// A desugared `for _ in _ { .. }` loop.
ForLoopDesugar,
/// A desugared `?` operator.
@ -2020,6 +2022,7 @@ impl MatchSource {
use MatchSource::*;
match self {
Normal => "match",
Postfix => ".match",
ForLoopDesugar => "for",
TryDesugar(_) => "?",
AwaitDesugar => ".await",