Remove use of soon-to-be-deprecated unstable feature

https://github.com/rust-lang/rust/issues/47336#issuecomment-586589016
This commit is contained in:
Simon Sapin 2020-04-15 15:10:11 +02:00
parent fbfe86fffe
commit 7861b0be79
2 changed files with 1 additions and 2 deletions

View file

@ -383,7 +383,7 @@ where
#[allow(unrooted_must_root)] #[allow(unrooted_must_root)]
pub unsafe fn from_box(value: Box<T>) -> Self { pub unsafe fn from_box(value: Box<T>) -> Self {
Self { Self {
ptr: Box::into_raw_non_null(value), ptr: Box::leak(value).into(),
} }
} }
} }

View file

@ -2,7 +2,6 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
#![feature(box_into_raw_non_null)]
#![feature(const_fn)] #![feature(const_fn)]
#![feature(const_transmute)] #![feature(const_transmute)]
#![feature(core_intrinsics)] #![feature(core_intrinsics)]