mirror of
https://github.com/apple/swift-collections
synced 2026-11-25 04:37:48 +00:00
Bump availability of Iterable_ and Container protocols to SwiftStdlib 6.4
This is preparing for switching over to the stdlib’s definition of `protocol Iterable`, assuming it will land with macOS 27/iOS 27 etc availability; `Container` is refining `Iterable`, so it needs matching availability. If `Iterable` won’t ship in Swift 6.4, then we’ll need to bump this again.
This commit is contained in:
66 files changed
+645
-418
No files matched your search
@@ -19,9 +19,9 @@ import ContainersPreview
|
||||
#if compiler(>=6.2)
|
||||
|
||||
#if compiler(>=6.4) && UnstableContainersPreview
|
||||
@available(SwiftStdlib 5.0, *)
|
||||
@available(SwiftStdlib 6.4, *)
|
||||
extension UniqueArray: Iterable_ where Element: ~Copyable {
|
||||
public typealias BorrowingIterator_ = RigidArray<Element>.BorrowingIterator_
|
||||
public typealias BorrowingIterator_ = Span<Element>.BorrowingIterator_
|
||||
|
||||
@inlinable
|
||||
public var underestimatedCount_: Int { count }
|
||||
@@ -35,7 +35,7 @@ extension UniqueArray: Iterable_ where Element: ~Copyable {
|
||||
#endif
|
||||
|
||||
#if compiler(>=6.4) && UnstableContainersPreview
|
||||
@available(SwiftStdlib 5.0, *)
|
||||
@available(SwiftStdlib 6.4, *)
|
||||
extension UniqueArray: Container where Element: ~Copyable {
|
||||
@_alwaysEmitIntoClient
|
||||
@_lifetime(borrow self)
|
||||
@@ -51,20 +51,20 @@ extension UniqueArray: Container where Element: ~Copyable {
|
||||
}
|
||||
}
|
||||
|
||||
@available(SwiftStdlib 5.0, *)
|
||||
@available(SwiftStdlib 6.4, *)
|
||||
extension UniqueArray: BidirectionalContainer where Element: ~Copyable {}
|
||||
|
||||
@available(SwiftStdlib 5.0, *)
|
||||
@available(SwiftStdlib 6.4, *)
|
||||
extension UniqueArray: RandomAccessContainer where Element: ~Copyable {}
|
||||
|
||||
@available(SwiftStdlib 5.0, *)
|
||||
@available(SwiftStdlib 6.4, *)
|
||||
extension UniqueArray: MutableContainer where Element: ~Copyable {}
|
||||
|
||||
#if compiler(>=6.4)
|
||||
@available(SwiftStdlib 5.0, *)
|
||||
@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
|
||||
|
||||
Reference in new issue
Block a user