Add postfix match MatchSource to HIR
This commit is contained in:
parent
d4ba888787
commit
567c98b30f
4 changed files with 10 additions and 3 deletions
|
@ -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",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue