File tree 2 files changed +9
-3
lines changed 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -17,3 +17,6 @@ use_spin = ["spin"]
17
17
[dependencies .spin ]
18
18
version = " 0.5"
19
19
optional = true
20
+
21
+ [dependencies ]
22
+ rustversion = " 1.0"
Original file line number Diff line number Diff line change 1
1
#![ feature( const_fn) ]
2
2
#![ feature( alloc, allocator_api) ]
3
3
#![ no_std]
4
+ #![ allow( stable_features) ]
4
5
5
6
#[ cfg( test) ]
6
7
#[ macro_use]
@@ -11,7 +12,11 @@ extern crate spin;
11
12
12
13
extern crate alloc;
13
14
14
- use alloc:: alloc:: { Alloc , AllocErr , Layout } ;
15
+ #[ rustversion:: before( 2020 -02 -02 ) ]
16
+ use alloc:: alloc:: Alloc ;
17
+ #[ rustversion:: since( 2020 -02 -02 ) ]
18
+ use alloc:: alloc:: AllocRef as Alloc ;
19
+ use alloc:: alloc:: { AllocErr , Layout } ;
15
20
use core:: alloc:: GlobalAlloc ;
16
21
use core:: cmp:: { max, min} ;
17
22
use core:: fmt;
@@ -264,8 +269,6 @@ unsafe impl GlobalAlloc for LockedHeap {
264
269
}
265
270
}
266
271
267
- use alloc:: boxed:: Box ;
268
-
269
272
/// A locked version of `Heap` with rescue before oom
270
273
///
271
274
/// # Usage
You can’t perform that action at this time.
0 commit comments