diff options
| author | Simon Sapin <simon.sapin@exyr.org> | 2020-04-15 15:37:46 +0200 |
|---|---|---|
| committer | Simon Sapin <simon.sapin@exyr.org> | 2020-04-15 16:18:33 +0200 |
| commit | cdb6bef4fbaf114e3d8546bf0bb213471a8d0f7c (patch) | |
| tree | 2f22f809f83def91ffd631d7cb98786fefbd4ceb /src/liballoc/sync.rs | |
| parent | df768c5c8fcb361c4dc94b4c776d6a78c12862e1 (diff) | |
| download | rust-cdb6bef4fbaf114e3d8546bf0bb213471a8d0f7c.tar.gz rust-cdb6bef4fbaf114e3d8546bf0bb213471a8d0f7c.zip | |
Deprecate `Box::into_raw_non_null`
Per https://github.com/rust-lang/rust/issues/47336#issuecomment-586589016
Diffstat (limited to 'src/liballoc/sync.rs')
| -rw-r--r-- | src/liballoc/sync.rs | 2 |
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. |
