about summary refs log tree commit diff
path: root/src/liballoc/sync.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/liballoc/sync.rs')
-rw-r--r--src/liballoc/sync.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/liballoc/sync.rs b/src/liballoc/sync.rs
index b1b22e46a7c..59bc8686cf4 100644
--- a/src/liballoc/sync.rs
+++ b/src/liballoc/sync.rs
@@ -325,7 +325,7 @@ impl<T> Arc<T> {
             weak: atomic::AtomicUsize::new(1),
             data,
         };
-        Self::from_inner(Box::into_raw_non_null(x))
+        Self::from_inner(Box::leak(x).into())
     }
 
     /// Constructs a new `Arc` with uninitialized contents.