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)]