diff options
| author | Sasha Pourcelot <sasha.pourcelot@protonmail.com> | 2024-04-22 18:48:41 +0200 |
|---|---|---|
| committer | Sasha Pourcelot <sasha.pourcelot@protonmail.com> | 2024-04-29 11:34:22 +0200 |
| commit | c8ff8a4dc7c9867c54df8f6d31120f4cd3923508 (patch) | |
| tree | 263de82e79823d8ea5d9b780e595031a616686c1 /compiler/rustc_ast_pretty/src | |
| parent | 7f2fc33da6633f5a764ddc263c769b6b2873d167 (diff) | |
| download | rust-c8ff8a4dc7c9867c54df8f6d31120f4cd3923508.tar.gz rust-c8ff8a4dc7c9867c54df8f6d31120f4cd3923508.zip | |
Pretty-print parenthesis around binary in postfix match
Signed-off-by: Sasha Pourcelot <sasha.pourcelot@protonmail.com>
Diffstat (limited to 'compiler/rustc_ast_pretty/src')
| -rw-r--r-- | compiler/rustc_ast_pretty/src/pprust/state/expr.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_ast_pretty/src/pprust/state/expr.rs b/compiler/rustc_ast_pretty/src/pprust/state/expr.rs index 4cbdc9f256d..b5bb781acdf 100644 --- a/compiler/rustc_ast_pretty/src/pprust/state/expr.rs +++ b/compiler/rustc_ast_pretty/src/pprust/state/expr.rs @@ -488,7 +488,7 @@ impl<'a> State<'a> { self.space(); } MatchKind::Postfix => { - self.print_expr_as_cond(expr); + self.print_expr_maybe_paren(expr, parser::PREC_POSTFIX, fixup); self.word_nbsp(".match"); } } |
