diff options
| author | David Tolnay <dtolnay@gmail.com> | 2024-11-17 12:25:19 -0800 |
|---|---|---|
| committer | David Tolnay <dtolnay@gmail.com> | 2024-11-17 14:01:37 -0800 |
| commit | e5f1555000158b796a1e245b7c75b5a969506e53 (patch) | |
| tree | c2989a7445f34fb0796d611dc7886d2d7e684ddd /compiler/rustc_hir_pretty/src/lib.rs | |
| parent | 23e7ecb34962ecd069cf28ae7db585e92ca2ee63 (diff) | |
| download | rust-e5f1555000158b796a1e245b7c75b5a969506e53.tar.gz rust-e5f1555000158b796a1e245b7c75b5a969506e53.zip | |
Inline ExprPrecedence::order into Expr::precedence
Diffstat (limited to 'compiler/rustc_hir_pretty/src/lib.rs')
| -rw-r--r-- | compiler/rustc_hir_pretty/src/lib.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_hir_pretty/src/lib.rs b/compiler/rustc_hir_pretty/src/lib.rs index 0a3aa8fec90..f4c20e34eda 100644 --- a/compiler/rustc_hir_pretty/src/lib.rs +++ b/compiler/rustc_hir_pretty/src/lib.rs @@ -1015,7 +1015,7 @@ impl<'a> State<'a> { } fn print_expr_maybe_paren(&mut self, expr: &hir::Expr<'_>, prec: i8) { - self.print_expr_cond_paren(expr, expr.precedence().order() < prec) + self.print_expr_cond_paren(expr, expr.precedence() < prec) } /// Prints an expr using syntax that's acceptable in a condition position, such as the `cond` in @@ -1049,7 +1049,7 @@ impl<'a> State<'a> { } self.space(); self.word_space("="); - let npals = || parser::needs_par_as_let_scrutinee(init.precedence().order()); + let npals = || parser::needs_par_as_let_scrutinee(init.precedence()); self.print_expr_cond_paren(init, Self::cond_needs_par(init) || npals()) } |
