[BasicContainers] Make the hashed containers Sendable

RigidSet, UniqueSet, RigidDictionary and UniqueDictionary had no
Sendable conformance, while the arrays and deques conform when their
elements are Sendable. Add the same conditional conformances: unchecked
for the rigid containers, which keep their elements behind unsafe
pointers, and checked for the unique ones.
This commit is contained in:
Tolga Unal committed 2026-11-16 11:38:37 -05:00
1 parent 88754449ab
commit c211bc56af
8 files changed
+42

No files matched your search

@@ -41,6 +41,10 @@ public struct UniqueDictionary<
}
}
@available(SwiftStdlib 5.0, *)
extension UniqueDictionary: Sendable
where Key: Sendable & ~Copyable, Value: Sendable & ~Copyable {}
@available(SwiftStdlib 5.0, *)
extension UniqueDictionary where Key: ~Copyable, Value: ~Copyable {
@inlinable