From dd7df04e168324fc002ab4985b6c7513f08ccf49 Mon Sep 17 00:00:00 2001 From: clubby789 Date: Mon, 27 Feb 2023 13:07:44 +0000 Subject: Remove uses of `box_syntax` in rustc and tools --- compiler/rustc_hir_pretty/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'compiler/rustc_hir_pretty/src') diff --git a/compiler/rustc_hir_pretty/src/lib.rs b/compiler/rustc_hir_pretty/src/lib.rs index c021fca7133..d715b03e40e 100644 --- a/compiler/rustc_hir_pretty/src/lib.rs +++ b/compiler/rustc_hir_pretty/src/lib.rs @@ -1367,8 +1367,8 @@ impl<'a> State<'a> { self.ann.pre(self, AnnNode::Expr(expr)); match expr.kind { hir::ExprKind::Box(expr) => { - self.word_space("box"); - self.print_expr_maybe_paren(expr, parser::PREC_PREFIX); + self.word_space("Box::new"); + self.print_call_post(std::slice::from_ref(expr)); } hir::ExprKind::Array(exprs) => { self.print_expr_vec(exprs); -- cgit 1.4.1-3-g733a5