File tree Expand file tree Collapse file tree 1 file changed +0
-11
lines changed Expand file tree Collapse file tree 1 file changed +0
-11
lines changed Original file line number Diff line number Diff line change 66//! be registered as the standard library’s default allocator.
77
88#![ no_std]
9- #![ feature( alloc_error_handler) ]
109
1110#[ macro_use]
1211extern crate log;
@@ -168,16 +167,6 @@ unsafe impl GlobalAlloc for GlobalAllocator {
168167#[ cfg_attr( all( target_os = "none" , not( test) ) , global_allocator) ]
169168static GLOBAL_ALLOCATOR : GlobalAllocator = GlobalAllocator :: new ( ) ;
170169
171- #[ cfg( all( target_os = "none" , not( test) ) ) ]
172- #[ alloc_error_handler]
173- fn handle_alloc_error ( layout : Layout ) -> ! {
174- panic ! (
175- "Heap allocation error: available_bytes = {}, request = {:?}" ,
176- global_allocator( ) . available_bytes( ) ,
177- layout
178- ) ;
179- }
180-
181170/// Returns the reference to the global allocator.
182171pub fn global_allocator ( ) -> & ' static GlobalAllocator {
183172 & GLOBAL_ALLOCATOR
You can’t perform that action at this time.
0 commit comments