From ad962d199189d559dd5f41c574cf26e5f08744ab Mon Sep 17 00:00:00 2001 From: pravic Date: Wed, 13 Sep 2017 07:15:01 +0300 Subject: fix: Fix allocator for modern Rust (uncomplete) See rust-lang/rfcs#1974 --- src/alloc/alloc.rs | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'src/alloc/alloc.rs') diff --git a/src/alloc/alloc.rs b/src/alloc/alloc.rs index 963c3e3..6408f23 100644 --- a/src/alloc/alloc.rs +++ b/src/alloc/alloc.rs @@ -1,18 +1,21 @@ //! Kernel Mode Allocator -// The compiler needs to be instructed that this crate is an allocator in order -// to realize that when this is linked in another allocator like jemalloc should -// not be linked in -#![feature(allocator)] -#![allocator] +#![crate_name = "alloc_system"] +#![crate_type = "rlib"] // Allocators are not allowed to depend on the standard library which in turn // requires an allocator in order to avoid circular dependencies. This crate, // however, can use all of libcore. #![no_std] -#![crate_name = "alloc_system"] -#![crate_type = "rlib"] +// The compiler needs to be instructed that this crate is an allocator in order +// to realize that when this is linked in another allocator like jemalloc should +// not be linked in +#![feature(global_allocator)] +#![feature(default_lib_allocator)] +//#![allocator] + + mod pool; -- cgit v1.2.3