[BasicContainers, ContainersPreview] Make sure package traits “work” on 6.2 toolchains

“Work” in this case means that they can be enabled without breaking the build — not necessarily that all features are available.

Swift 6.2 is highly prone to runtime crashes in `swift_getTypeByMangledName` in generic code that uses ownership features. Swift 6.3 will resolve that.
This commit is contained in:
Karoy Lorentey committed 2026-03-17 15:38:34 -07:00
1 parent 3dc65340f3
commit 8f88cce7c7
26 files changed
+44 -28

No files matched your search

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