about summary refs log tree commit diff
path: root/src/liballoc
diff options
context:
space:
mode:
authorDylan DPC <dylan.dpc@gmail.com>2020-04-25 18:30:34 +0200
committerGitHub <noreply@github.com>2020-04-25 18:30:34 +0200
commit82642d708fdd57a2072ef1d182558df5909380b0 (patch)
tree742b388ed95f312320db5bfe87bd8810eb211b6e /src/liballoc
parentecef6c7c809eba2a4eed5e281f19ab7331998c6f (diff)
parent78a034d168260ad89695039dcc38934f938650e2 (diff)
downloadrust-82642d708fdd57a2072ef1d182558df5909380b0.tar.gz
rust-82642d708fdd57a2072ef1d182558df5909380b0.zip
Rollup merge of #71548 - crlf0710:cursor_bounds, r=Amanieu
Add missing Send and Sync impls for linked list Cursor and CursorMut.

Someone pointed out these to me, and i think it's indeed reasonable to add those impl.

r? @Amanieu
Diffstat (limited to 'src/liballoc')
-rw-r--r--src/liballoc/collections/linked_list.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/liballoc/collections/linked_list.rs b/src/liballoc/collections/linked_list.rs
index 5825bd306b6..9dd7fc6d7ee 100644
--- a/src/liballoc/collections/linked_list.rs
+++ b/src/liballoc/collections/linked_list.rs
@@ -1841,3 +1841,15 @@ unsafe impl<T: Send> Send for IterMut<'_, T> {}
 
 #[stable(feature = "rust1", since = "1.0.0")]
 unsafe impl<T: Sync> Sync for IterMut<'_, T> {}
+
+#[unstable(feature = "linked_list_cursors", issue = "58533")]
+unsafe impl<T: Sync> Send for Cursor<'_, T> {}
+
+#[unstable(feature = "linked_list_cursors", issue = "58533")]
+unsafe impl<T: Sync> Sync for Cursor<'_, T> {}
+
+#[unstable(feature = "linked_list_cursors", issue = "58533")]
+unsafe impl<T: Send> Send for CursorMut<'_, T> {}
+
+#[unstable(feature = "linked_list_cursors", issue = "58533")]
+unsafe impl<T: Sync> Sync for CursorMut<'_, T> {}