@@ -45,7 +45,7 @@ extern crate alloc;
45
45
use std:: cell:: { Cell , RefCell } ;
46
46
use std:: cmp;
47
47
use std:: intrinsics;
48
- use std:: marker;
48
+ use std:: marker:: { PhantomData , Send } ;
49
49
use std:: mem;
50
50
use std:: ptr;
51
51
use std:: raw;
@@ -103,7 +103,7 @@ pub struct Arena<'longer_than_self> {
103
103
head : RefCell < Chunk > ,
104
104
copy_head : RefCell < Chunk > ,
105
105
chunks : RefCell < Vec < Chunk > > ,
106
- _marker : marker :: PhantomData < * mut & ' longer_than_self ( ) > ,
106
+ _marker : PhantomData < * mut & ' longer_than_self ( ) > ,
107
107
}
108
108
109
109
impl < ' a > Arena < ' a > {
@@ -118,7 +118,7 @@ impl<'a> Arena<'a> {
118
118
head : RefCell :: new ( chunk ( initial_size, false ) ) ,
119
119
copy_head : RefCell :: new ( chunk ( initial_size, true ) ) ,
120
120
chunks : RefCell :: new ( Vec :: new ( ) ) ,
121
- _marker : marker :: PhantomData ,
121
+ _marker : PhantomData ,
122
122
}
123
123
}
124
124
}
@@ -382,7 +382,7 @@ pub struct TypedArena<T> {
382
382
383
383
/// Marker indicating that dropping the arena causes its owned
384
384
/// instances of `T` to be dropped.
385
- _own : marker :: PhantomData < T > ,
385
+ _own : PhantomData < T > ,
386
386
}
387
387
388
388
struct TypedArenaChunk < T > {
@@ -452,7 +452,7 @@ impl<T> TypedArena<T> {
452
452
ptr : Cell :: new ( chunk. start ( ) ) ,
453
453
end : Cell :: new ( chunk. end ( ) ) ,
454
454
chunks : RefCell :: new ( vec ! [ chunk] ) ,
455
- _own : marker :: PhantomData ,
455
+ _own : PhantomData ,
456
456
}
457
457
}
458
458
}
@@ -531,6 +531,8 @@ impl<T> Drop for TypedArena<T> {
531
531
}
532
532
}
533
533
534
+ unsafe impl < T : Send > Send for TypedArena < T > { }
535
+
534
536
#[ cfg( test) ]
535
537
mod tests {
536
538
extern crate test;
0 commit comments