about summary refs log tree commit diff
path: root/compiler/rustc_ast/src/ptr.rs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/rustc_ast/src/ptr.rs')
-rw-r--r--compiler/rustc_ast/src/ptr.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_ast/src/ptr.rs b/compiler/rustc_ast/src/ptr.rs
index e4a3cccb7ea..9fe87a0a637 100644
--- a/compiler/rustc_ast/src/ptr.rs
+++ b/compiler/rustc_ast/src/ptr.rs
@@ -37,7 +37,7 @@ pub struct P<T: ?Sized> {
 /// Construct a `P<T>` from a `T` value.
 #[allow(non_snake_case)]
 pub fn P<T: 'static>(value: T) -> P<T> {
-    P { ptr: box value }
+    P { ptr: Box::new(value) }
 }
 
 impl<T: 'static> P<T> {