Add Sync impl for Slice

This commit is contained in:
John Kåre Alsaker 2018-06-01 15:22:37 +02:00
parent 461fa8495e
commit 2119d04b2d

View File

@ -617,6 +617,8 @@ pub struct Slice<T> {
opaque: OpaqueSliceContents,
}
unsafe impl<T: Sync> Sync for Slice<T> {}
impl<T: Copy> Slice<T> {
#[inline]
fn from_arena<'tcx>(arena: &'tcx SyncDroplessArena, slice: &[T]) -> &'tcx Slice<T> {