From b1fbd797c04ae151003372b9d9fb761fff669790 Mon Sep 17 00:00:00 2001 From: Charles Lew Date: Sat, 25 Apr 2020 16:33:11 +0800 Subject: [PATCH 1/2] Add missing Send and Sync bounds for linked list Cursor and CursorMut. --- src/liballoc/collections/linked_list.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/liballoc/collections/linked_list.rs b/src/liballoc/collections/linked_list.rs index af341e6c1caab..9321d38f3b73e 100644 --- a/src/liballoc/collections/linked_list.rs +++ b/src/liballoc/collections/linked_list.rs @@ -1843,3 +1843,15 @@ unsafe impl Send for IterMut<'_, T> {} #[stable(feature = "rust1", since = "1.0.0")] unsafe impl Sync for IterMut<'_, T> {} + +#[unstable(feature = "linked_list_cursors", issue = "58533")] +unsafe impl Send for Cursor<'_, T> {} + +#[unstable(feature = "linked_list_cursors", issue = "58533")] +unsafe impl Sync for Cursor<'_, T> {} + +#[unstable(feature = "linked_list_cursors", issue = "58533")] +unsafe impl Send for CursorMut<'_, T> {} + +#[unstable(feature = "linked_list_cursors", issue = "58533")] +unsafe impl Sync for CursorMut<'_, T> {} From 78a034d168260ad89695039dcc38934f938650e2 Mon Sep 17 00:00:00 2001 From: Charles Lew Date: Sat, 25 Apr 2020 22:48:16 +0800 Subject: [PATCH 2/2] Use the correct bound for `Cursor` `Send` Co-Authored-By: Amanieu d'Antras --- src/liballoc/collections/linked_list.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/liballoc/collections/linked_list.rs b/src/liballoc/collections/linked_list.rs index 9321d38f3b73e..fc12e1e7dd983 100644 --- a/src/liballoc/collections/linked_list.rs +++ b/src/liballoc/collections/linked_list.rs @@ -1845,7 +1845,7 @@ unsafe impl Send for IterMut<'_, T> {} unsafe impl Sync for IterMut<'_, T> {} #[unstable(feature = "linked_list_cursors", issue = "58533")] -unsafe impl Send for Cursor<'_, T> {} +unsafe impl Send for Cursor<'_, T> {} #[unstable(feature = "linked_list_cursors", issue = "58533")] unsafe impl Sync for Cursor<'_, T> {}