Clean up the UniqueBox/Ref/MutableRef situation

- UniqueBox is public API, so we cannot remove it in favor of the stdlib’s
- Remove Ref and MutableRef. Keep an internal _MutableRef to work around stdlib limitations.
This commit is contained in:
Karoy Lorentey committed 2026-06-17 18:29:41 -07:00
1 parent 51c9e4ead8
commit 3d68fc1107
18 files changed
+165 -403

No files matched your search

@@ -116,8 +116,8 @@ extension UniqueArray where Element: ~Copyable {
}
#endif
#if compiler(>=6.3) && UnstableContainersPreview
@available(SwiftStdlib 5.0, *)
#if compiler(>=6.4) && UnstableContainersPreview
@available(SwiftStdlib 6.4, *)
extension UniqueArray where Element: ~Copyable {
public typealias SubrangeConsumer = RigidArray<Element>.SubrangeConsumer
@@ -47,11 +47,11 @@ extension UniqueArray: RandomAccessContainer where Element: ~Copyable {}
@available(SwiftStdlib 5.0, *)
extension UniqueArray: MutableContainer where Element: ~Copyable {}
#if compiler(>=6.3)
@available(SwiftStdlib 5.0, *)
#if compiler(>=6.4)
@available(SwiftStdlib 6.4, *)
extension UniqueArray: RangeReplaceableContainer where Element: ~Copyable {}
@available(SwiftStdlib 5.0, *)
@available(SwiftStdlib 6.4, *)
extension UniqueArray: DynamicContainer where Element: ~Copyable {}
#endif
#endif