about summary refs log tree commit diff
path: root/compiler/rustc_hir_pretty/src
diff options
context:
space:
mode:
authorclubby789 <jamie@hill-daniel.co.uk>2023-02-27 13:07:44 +0000
committerclubby789 <jamie@hill-daniel.co.uk>2023-03-12 13:19:46 +0000
commitdd7df04e168324fc002ab4985b6c7513f08ccf49 (patch)
treed20567e06dfccad24f16dabddb42852a498a8c1a /compiler/rustc_hir_pretty/src
parent24c0b81c1fd5de8e00276524896d3352ed91a8cb (diff)
downloadrust-dd7df04e168324fc002ab4985b6c7513f08ccf49.tar.gz
rust-dd7df04e168324fc002ab4985b6c7513f08ccf49.zip
Remove uses of `box_syntax` in rustc and tools
Diffstat (limited to 'compiler/rustc_hir_pretty/src')
-rw-r--r--compiler/rustc_hir_pretty/src/lib.rs4
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 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);