Skip to content

Commit 8fb25ab

Browse files
author
Rohit Joshi
committed
PR#20326 : Issue#20322: Adding unsafe Send and Sync traits implementation for RingBuf
1 parent fea5aa6 commit 8fb25ab

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/libcollections/ring_buf.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,12 @@ pub struct RingBuf<T> {
4848
ptr: *mut T
4949
}
5050

51+
#[stable]
52+
unsafe impl<T: Send> Send for RingBuf<T> {}
53+
54+
#[stable]
55+
unsafe impl<T: Sync> Sync for RingBuf<T> {}
56+
5157
#[stable]
5258
impl<T: Clone> Clone for RingBuf<T> {
5359
fn clone(&self) -> RingBuf<T> {

0 commit comments

Comments
 (0)