File tree 1 file changed +0
-11
lines changed
1 file changed +0
-11
lines changed Original file line number Diff line number Diff line change 6
6
//! be registered as the standard library’s default allocator.
7
7
8
8
#![ no_std]
9
- #![ feature( alloc_error_handler) ]
10
9
11
10
#[ macro_use]
12
11
extern crate log;
@@ -168,16 +167,6 @@ unsafe impl GlobalAlloc for GlobalAllocator {
168
167
#[ cfg_attr( all( target_os = "none" , not( test) ) , global_allocator) ]
169
168
static GLOBAL_ALLOCATOR : GlobalAllocator = GlobalAllocator :: new ( ) ;
170
169
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
-
181
170
/// Returns the reference to the global allocator.
182
171
pub fn global_allocator ( ) -> & ' static GlobalAllocator {
183
172
& GLOBAL_ALLOCATOR
You can’t perform that action at this time.
0 commit comments