about summary refs log tree commit diff
path: root/src/libcollections
diff options
context:
space:
mode:
authorMichael Layzell <michael@thelayzells.com>2015-09-24 18:19:23 -0400
committerMichael Layzell <michael@thelayzells.com>2015-10-08 09:49:32 -0400
commit493355d8e92ab00f0f6b787e4226c095ccd83a55 (patch)
treee9cc4591e5e0ea3d3e560ec07a07aa44c53c2432 /src/libcollections
parent45be6fc4d755b1376942196edc9efc7b62a43808 (diff)
downloadrust-493355d8e92ab00f0f6b787e4226c095ccd83a55.tar.gz
rust-493355d8e92ab00f0f6b787e4226c095ccd83a55.zip
Add unsafe Send and Sync impls to VecDeque's Drain<T>
Diffstat (limited to 'src/libcollections')
-rw-r--r--src/libcollections/vec_deque.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libcollections/vec_deque.rs b/src/libcollections/vec_deque.rs
index 27a996055f5..807c02af6e1 100644
--- a/src/libcollections/vec_deque.rs
+++ b/src/libcollections/vec_deque.rs
@@ -1800,6 +1800,9 @@ pub struct Drain<'a, T: 'a> {
     deque: *mut VecDeque<T>,
 }
 
+unsafe impl<'a, T: Sync> Sync for Drain<'a, T> {}
+unsafe impl<'a, T: Send> Send for Drain<'a, T> {}
+
 #[stable(feature = "rust1", since = "1.0.0")]
 impl<'a, T: 'a> Drop for Drain<'a, T> {
     fn drop(&mut self) {