about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--compiler/rustc_ast_lowering/src/format.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/compiler/rustc_ast_lowering/src/format.rs b/compiler/rustc_ast_lowering/src/format.rs
index 7a4e056175c..12f0af75486 100644
--- a/compiler/rustc_ast_lowering/src/format.rs
+++ b/compiler/rustc_ast_lowering/src/format.rs
@@ -551,8 +551,7 @@ fn expand_format_args<'hir>(
 
     // Generate:
     //     &args
-    let args =
-        ctx.expr(macsp, hir::ExprKind::AddrOf(hir::BorrowKind::Ref, hir::Mutability::Not, args));
+    let args = ctx.expr_ref(macsp, args);
 
     let call = if let Some(format_options) = format_options {
         // Generate: