]> git.lizzy.rs Git - rust.git/commitdiff
Fix overconstrained Send impls in btree internals
authorDavid Tolnay <dtolnay@gmail.com>
Wed, 5 Oct 2022 18:46:12 +0000 (11:46 -0700)
committerDavid Tolnay <dtolnay@gmail.com>
Wed, 5 Oct 2022 19:16:32 +0000 (12:16 -0700)
library/alloc/src/collections/btree/node.rs

index f1d2d3b30d9e244c3771859365d871e1f2a0b5b2..da766b67a328f6b0a0356c28d397005768ff8935 100644 (file)
@@ -206,9 +206,9 @@ fn clone(&self) -> Self {
 
 unsafe impl<BorrowType, K: Sync, V: Sync, Type> Sync for NodeRef<BorrowType, K, V, Type> {}
 
-unsafe impl<'a, K: Sync + 'a, V: Sync + 'a, Type> Send for NodeRef<marker::Immut<'a>, K, V, Type> {}
-unsafe impl<'a, K: Send + 'a, V: Send + 'a, Type> Send for NodeRef<marker::Mut<'a>, K, V, Type> {}
-unsafe impl<'a, K: Send + 'a, V: Send + 'a, Type> Send for NodeRef<marker::ValMut<'a>, K, V, Type> {}
+unsafe impl<K: Sync, V: Sync, Type> Send for NodeRef<marker::Immut<'_>, K, V, Type> {}
+unsafe impl<K: Send, V: Send, Type> Send for NodeRef<marker::Mut<'_>, K, V, Type> {}
+unsafe impl<K: Send, V: Send, Type> Send for NodeRef<marker::ValMut<'_>, K, V, Type> {}
 unsafe impl<K: Send, V: Send, Type> Send for NodeRef<marker::Owned, K, V, Type> {}
 unsafe impl<K: Send, V: Send, Type> Send for NodeRef<marker::Dying, K, V, Type> {}