Fix precedence of postfix match

This commit is contained in:
Michael Goulet
2024-04-02 19:30:32 -04:00
parent 36b6f9b58e
commit ab821aed0c
2 changed files with 5 additions and 2 deletions

View File

@@ -281,6 +281,7 @@ pub enum ExprPrecedence {
ForLoop,
Loop,
Match,
PostfixMatch,
ConstBlock,
Block,
TryBlock,
@@ -334,7 +335,8 @@ impl ExprPrecedence {
| ExprPrecedence::InlineAsm
| ExprPrecedence::Mac
| ExprPrecedence::FormatArgs
| ExprPrecedence::OffsetOf => PREC_POSTFIX,
| ExprPrecedence::OffsetOf
| ExprPrecedence::PostfixMatch => PREC_POSTFIX,
// Never need parens
ExprPrecedence::Array