From 7861b0be7900df6c7dbf8d4dac8ba14a8d4e3a56 Mon Sep 17 00:00:00 2001 From: Simon Sapin Date: Wed, 15 Apr 2020 15:10:11 +0200 Subject: [PATCH] Remove use of soon-to-be-deprecated unstable feature https://github.com/rust-lang/rust/issues/47336#issuecomment-586589016 --- components/script/dom/bindings/root.rs | 2 +- components/script/lib.rs | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/components/script/dom/bindings/root.rs b/components/script/dom/bindings/root.rs index 4f4d376e951..59f9b964564 100644 --- a/components/script/dom/bindings/root.rs +++ b/components/script/dom/bindings/root.rs @@ -383,7 +383,7 @@ where #[allow(unrooted_must_root)] pub unsafe fn from_box(value: Box) -> Self { Self { - ptr: Box::into_raw_non_null(value), + ptr: Box::leak(value).into(), } } } diff --git a/components/script/lib.rs b/components/script/lib.rs index 996480cff53..8637411d89c 100644 --- a/components/script/lib.rs +++ b/components/script/lib.rs @@ -2,7 +2,6 @@ * 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/. */ -#![feature(box_into_raw_non_null)] #![feature(const_fn)] #![feature(const_transmute)] #![feature(core_intrinsics)]