diff --git a/components/gfx/lib.rs b/components/gfx/lib.rs index 86e275bd254..5a5de4da89e 100644 --- a/components/gfx/lib.rs +++ b/components/gfx/lib.rs @@ -3,7 +3,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ // For SIMD -#![cfg_attr(any(target_os = "linux", target_os = "android"), feature(alloc, allocator_api))] +#![cfg_attr(any(target_os = "linux", target_os = "android"), feature(allocator_api))] #![feature(box_syntax)] #![feature(cfg_target_feature)] #![feature(range_contains)] @@ -11,9 +11,6 @@ #![deny(unsafe_code)] -#[cfg(any(target_os = "linux", target_os = "android"))] -extern crate alloc; - extern crate app_units; #[macro_use] extern crate bitflags; diff --git a/components/gfx/platform/freetype/font_context.rs b/components/gfx/platform/freetype/font_context.rs index bca6de5484e..5e19e081663 100644 --- a/components/gfx/platform/freetype/font_context.rs +++ b/components/gfx/platform/freetype/font_context.rs @@ -2,8 +2,6 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -use alloc::allocator::{Alloc, Layout}; -use alloc::heap::Heap; use freetype::freetype::FT_Add_Default_Modules; use freetype::freetype::FT_Done_Library; use freetype::freetype::FT_Library; @@ -11,6 +9,7 @@ use freetype::freetype::FT_Memory; use freetype::freetype::FT_MemoryRec_; use freetype::freetype::FT_New_Library; use heapsize::{HeapSizeOf, heap_size_of}; +use std::heap::{Heap, Alloc, Layout}; use std::os::raw::{c_long, c_void}; use std::ptr; use std::rc::Rc;