mirror of
https://github.com/apple/swift-collections
synced 2026-11-28 05:04:21 +00:00
[ContainersPreview] Bump required toolchain to 6.4 for new protocols
This commit is contained in:
67 files changed
+152
-131
No files matched your search
@@ -178,7 +178,7 @@ extension RigidDeque where Element: ~Copyable {
|
||||
}
|
||||
}
|
||||
|
||||
#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW
|
||||
#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW
|
||||
/// Appends at most `newItemCount` items generated by a producer to the end of
|
||||
/// this deque.
|
||||
///
|
||||
@@ -213,7 +213,7 @@ extension RigidDeque where Element: ~Copyable {
|
||||
}
|
||||
#endif
|
||||
|
||||
#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW
|
||||
#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW
|
||||
/// Appends all the items generated by a producer to the end of this deque.
|
||||
///
|
||||
/// If the target deque does not have sufficient capacity to hold all the
|
||||
@@ -306,7 +306,7 @@ extension RigidDeque /*where Element: Copyable*/ {
|
||||
}
|
||||
}
|
||||
|
||||
#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW
|
||||
#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW
|
||||
@_alwaysEmitIntoClient
|
||||
internal mutating func _append<
|
||||
S: BorrowingSequence<Element> & ~Copyable & ~Escapable
|
||||
@@ -359,7 +359,7 @@ extension RigidDeque /*where Element: Copyable*/ {
|
||||
precondition(it.next() == nil, "RigidDeque capacity overflow")
|
||||
}
|
||||
|
||||
#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW
|
||||
#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW
|
||||
/// Copies the elements of a borrowing sequence to the end of this deque.
|
||||
///
|
||||
/// If the deque does not have sufficient capacity to hold all items in the
|
||||
|
||||
@@ -218,8 +218,14 @@ extension RigidDeque where Element: ~Copyable {
|
||||
}
|
||||
}
|
||||
|
||||
#if compiler(>=6.4)
|
||||
@available(SwiftStdlib 5.0, *)
|
||||
extension RigidDeque.SubrangeConsumer: Drain where Element: ~Copyable {
|
||||
}
|
||||
#endif
|
||||
|
||||
@available(SwiftStdlib 5.0, *)
|
||||
extension RigidDeque.SubrangeConsumer where Element: ~Copyable {
|
||||
@inlinable
|
||||
@_lifetime(&self)
|
||||
@_lifetime(self: copy self)
|
||||
|
||||
@@ -21,7 +21,7 @@ import ContainersPreview
|
||||
|
||||
@available(SwiftStdlib 5.0, *)
|
||||
extension RigidDeque where Element: ~Copyable {
|
||||
#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW
|
||||
#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW
|
||||
@frozen
|
||||
public struct BorrowingIterator: ~Escapable, BorrowingIteratorProtocol {
|
||||
@usableFromInline
|
||||
@@ -64,7 +64,7 @@ extension RigidDeque where Element: ~Copyable {
|
||||
#endif
|
||||
}
|
||||
|
||||
#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW
|
||||
#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW
|
||||
@available(SwiftStdlib 5.0, *)
|
||||
extension RigidDeque: Container where Element: ~Copyable {}
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ extension RigidDeque /*: Equatable */ where Element: Equatable /* & ~Copyable */
|
||||
guard left.count == right.count else { return false }
|
||||
guard !left.isTriviallyIdentical(to: right) else { return true }
|
||||
|
||||
#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW
|
||||
#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW
|
||||
return left._elementsEqual(right)
|
||||
#else
|
||||
for i in 0 ..< left.count {
|
||||
|
||||
@@ -68,7 +68,7 @@ extension RigidDeque where Element: ~Copyable {
|
||||
|
||||
@available(SwiftStdlib 5.0, *)
|
||||
extension RigidDeque where Element: ~Copyable {
|
||||
#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW
|
||||
#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW
|
||||
/// Creates a new rigid deque of the specified capacity, populating it with
|
||||
/// all items generated by a given producer.
|
||||
///
|
||||
@@ -119,7 +119,7 @@ extension RigidDeque /*where Element: Copyable*/ {
|
||||
|
||||
@available(SwiftStdlib 5.0, *)
|
||||
extension RigidDeque /*where Element: Copyable*/ {
|
||||
#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW
|
||||
#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW
|
||||
/// Creates a new deque with the specified capacity, holding a copy
|
||||
/// of the contents of a given borrowing sequence.
|
||||
///
|
||||
@@ -174,7 +174,7 @@ extension RigidDeque /*where Element: Copyable*/ {
|
||||
self.append(copying: contents)
|
||||
}
|
||||
|
||||
#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW
|
||||
#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW
|
||||
/// Creates a new deque with the specified capacity, holding a copy
|
||||
/// of the contents of a given sequence.
|
||||
///
|
||||
|
||||
@@ -208,7 +208,7 @@ extension RigidDeque where Element: ~Copyable {
|
||||
|
||||
@available(SwiftStdlib 5.0, *)
|
||||
extension RigidDeque where Element: ~Copyable {
|
||||
#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW
|
||||
#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW
|
||||
/// Inserts at most `newItemCount` items generated by a producer into this
|
||||
/// deque, starting at the given index.
|
||||
///
|
||||
@@ -352,7 +352,7 @@ extension RigidDeque /* where Element: Copyable */ {
|
||||
}
|
||||
}
|
||||
|
||||
#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW
|
||||
#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW
|
||||
@inlinable
|
||||
internal mutating func _insertContainer<
|
||||
C: Container<Element> & ~Copyable & ~Escapable
|
||||
@@ -394,7 +394,7 @@ extension RigidDeque /* where Element: Copyable */ {
|
||||
"Broken Collection: count doesn't match contents")
|
||||
}
|
||||
|
||||
#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW
|
||||
#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW
|
||||
/// Copies the elements of a container into this deque at the specified
|
||||
/// position.
|
||||
///
|
||||
@@ -456,7 +456,7 @@ extension RigidDeque /* where Element: Copyable */ {
|
||||
at: index, copying: items, newCount: items.count)
|
||||
}
|
||||
|
||||
#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW
|
||||
#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW
|
||||
/// Copies the elements of a container into this deque at the specified
|
||||
/// position.
|
||||
///
|
||||
|
||||
@@ -182,7 +182,7 @@ extension RigidDeque where Element: ~Copyable {
|
||||
}
|
||||
}
|
||||
|
||||
#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW
|
||||
#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW
|
||||
/// Prepends at most `newItemCount` items generated by a producer to the
|
||||
/// front of this deque.
|
||||
///
|
||||
@@ -285,7 +285,7 @@ extension RigidDeque /*where Element: Copyable*/ {
|
||||
}
|
||||
}
|
||||
|
||||
#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW
|
||||
#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW
|
||||
@inlinable
|
||||
internal mutating func _prepend<
|
||||
S: BorrowingSequence<Element> & ~Copyable & ~Escapable
|
||||
@@ -424,7 +424,7 @@ extension RigidDeque /*where Element: Copyable*/ {
|
||||
_handle.uncheckedPrepend(copying: items, exactCount: c)
|
||||
}
|
||||
|
||||
#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW
|
||||
#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW
|
||||
/// Copies the elements of a borrowing sequence to the end of this deque.
|
||||
///
|
||||
/// If the deque does not have sufficient capacity to hold all items in the
|
||||
|
||||
@@ -279,7 +279,7 @@ extension RigidDeque where Element: ~Copyable {
|
||||
}
|
||||
}
|
||||
|
||||
#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW
|
||||
#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW
|
||||
/// Replaces the specified range of elements by at most `newItemCount` items
|
||||
/// generated by a producer.
|
||||
///
|
||||
@@ -453,7 +453,7 @@ extension RigidDeque /* where Element: Copyable */ {
|
||||
}
|
||||
}
|
||||
|
||||
#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW
|
||||
#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW
|
||||
@inlinable
|
||||
internal mutating func _replace<
|
||||
C: Container<Element> & ~Copyable & ~Escapable
|
||||
@@ -497,7 +497,7 @@ extension RigidDeque /* where Element: Copyable */ {
|
||||
}
|
||||
}
|
||||
|
||||
#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW
|
||||
#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW
|
||||
/// Replaces the specified subrange of elements by copying the elements of
|
||||
/// the given container.
|
||||
///
|
||||
@@ -573,7 +573,7 @@ extension RigidDeque /* where Element: Copyable */ {
|
||||
removing: subrange, copyingCollection: items, newCount: items.count)
|
||||
}
|
||||
|
||||
#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW
|
||||
#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW
|
||||
/// Replaces the specified subrange of elements by copying the elements of
|
||||
/// the given container.
|
||||
///
|
||||
|
||||
@@ -168,7 +168,7 @@ extension UniqueDeque where Element: ~Copyable {
|
||||
}
|
||||
}
|
||||
|
||||
#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW
|
||||
#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW
|
||||
/// Appends at most `newItemCount` items generated by a producer to the end of
|
||||
/// this deque.
|
||||
///
|
||||
@@ -201,7 +201,7 @@ extension UniqueDeque where Element: ~Copyable {
|
||||
}
|
||||
#endif
|
||||
|
||||
#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW
|
||||
#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW
|
||||
/// Appends all the items generated by a producer to the end of this deque.
|
||||
///
|
||||
/// If the deque doesn't have sufficient capacity to accommodate all the
|
||||
@@ -293,7 +293,7 @@ extension UniqueDeque /*where Element: Copyable*/ {
|
||||
_storage.append(copying: items)
|
||||
}
|
||||
|
||||
#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW
|
||||
#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW
|
||||
@_alwaysEmitIntoClient
|
||||
internal mutating func _append<
|
||||
S: BorrowingSequence<Element> & ~Copyable & ~Escapable
|
||||
@@ -356,7 +356,7 @@ extension UniqueDeque /*where Element: Copyable*/ {
|
||||
}
|
||||
}
|
||||
|
||||
#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW
|
||||
#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW
|
||||
/// Copies the elements of a borrowing sequence to the end of this deque.
|
||||
///
|
||||
/// If the deque doesn't have sufficient capacity to accommodate the new
|
||||
|
||||
@@ -21,7 +21,7 @@ import ContainersPreview
|
||||
|
||||
@available(SwiftStdlib 5.0, *)
|
||||
extension UniqueDeque where Element: ~Copyable {
|
||||
#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW
|
||||
#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW
|
||||
public typealias BorrowingIterator = RigidDeque<Element>.BorrowingIterator
|
||||
|
||||
@_alwaysEmitIntoClient
|
||||
@@ -32,7 +32,7 @@ extension UniqueDeque where Element: ~Copyable {
|
||||
#endif
|
||||
}
|
||||
|
||||
#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW
|
||||
#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW
|
||||
@available(SwiftStdlib 5.0, *)
|
||||
extension UniqueDeque: Container where Element: ~Copyable {}
|
||||
|
||||
|
||||
@@ -78,7 +78,7 @@ extension UniqueDeque where Element: ~Copyable {
|
||||
|
||||
@available(SwiftStdlib 5.0, *)
|
||||
extension UniqueDeque where Element: ~Copyable {
|
||||
#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW
|
||||
#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW
|
||||
/// Creates a new unique deque of the specified capacity, populating it with
|
||||
/// all items generated by a given producer.
|
||||
///
|
||||
@@ -99,7 +99,7 @@ extension UniqueDeque where Element: ~Copyable {
|
||||
}
|
||||
#endif
|
||||
|
||||
#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW
|
||||
#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW
|
||||
/// Creates a new unique deque, populating it with
|
||||
/// all items generated by a given producer.
|
||||
///
|
||||
@@ -139,7 +139,7 @@ extension UniqueDeque /*where Element: Copyable*/ {
|
||||
|
||||
@available(SwiftStdlib 5.0, *)
|
||||
extension UniqueDeque /*where Element: Copyable*/ {
|
||||
#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW
|
||||
#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW
|
||||
/// Creates a new deque with the specified capacity, holding a copy
|
||||
/// of the contents of a given borrowing sequence.
|
||||
///
|
||||
@@ -177,7 +177,7 @@ extension UniqueDeque /*where Element: Copyable*/ {
|
||||
self.append(copying: contents)
|
||||
}
|
||||
|
||||
#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW
|
||||
#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW
|
||||
/// Creates a new deque with the specified capacity, holding a copy
|
||||
/// of the contents of a given sequence.
|
||||
///
|
||||
|
||||
@@ -218,7 +218,7 @@ extension UniqueDeque where Element: ~Copyable {
|
||||
|
||||
@available(SwiftStdlib 5.0, *)
|
||||
extension UniqueDeque where Element: ~Copyable {
|
||||
#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW
|
||||
#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW
|
||||
/// Inserts at most `newItemCount` items generated by a producer into this
|
||||
/// deque, starting at the given index.
|
||||
///
|
||||
@@ -370,7 +370,7 @@ extension UniqueDeque /* where Element: Copyable */ {
|
||||
}
|
||||
}
|
||||
|
||||
#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW
|
||||
#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW
|
||||
@inlinable
|
||||
internal mutating func _insertContainer<
|
||||
C: Container<Element> & ~Copyable & ~Escapable
|
||||
@@ -413,7 +413,7 @@ extension UniqueDeque /* where Element: Copyable */ {
|
||||
"Broken Collection: count doesn't match contents")
|
||||
}
|
||||
|
||||
#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW
|
||||
#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW
|
||||
/// Copies the elements of a container into this deque at the specified
|
||||
/// position.
|
||||
///
|
||||
@@ -479,7 +479,7 @@ extension UniqueDeque /* where Element: Copyable */ {
|
||||
at: index, copying: items, newCount: items.count)
|
||||
}
|
||||
|
||||
#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW
|
||||
#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW
|
||||
/// Copies the elements of a container into this deque at the specified
|
||||
/// position.
|
||||
///
|
||||
|
||||
@@ -173,7 +173,7 @@ extension UniqueDeque where Element: ~Copyable {
|
||||
}
|
||||
}
|
||||
|
||||
#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW
|
||||
#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW
|
||||
/// Prepends at most `newItemCount` items generated by a producer to the front
|
||||
/// of this deque.
|
||||
///
|
||||
@@ -218,7 +218,7 @@ extension UniqueDeque where Element: ~Copyable {
|
||||
}
|
||||
#endif
|
||||
|
||||
#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW
|
||||
#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW
|
||||
/// Prepends all items generated by a producer to the front of this deque.
|
||||
///
|
||||
/// If the deque doesn't have sufficient capacity to accommodate all the
|
||||
@@ -315,7 +315,7 @@ extension UniqueDeque /*where Element: Copyable*/ {
|
||||
}
|
||||
}
|
||||
|
||||
#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW
|
||||
#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW
|
||||
@inlinable
|
||||
internal mutating func _prepend<
|
||||
S: BorrowingSequence<Element> & ~Copyable & ~Escapable
|
||||
@@ -460,7 +460,7 @@ extension UniqueDeque /*where Element: Copyable*/ {
|
||||
_storage._handle.uncheckedPrepend(copying: items, exactCount: c)
|
||||
}
|
||||
|
||||
#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW
|
||||
#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW
|
||||
/// Copies the elements of a borrowing sequence to the end of this deque.
|
||||
///
|
||||
/// If the deque does not have sufficient capacity to hold all items in the
|
||||
|
||||
@@ -287,7 +287,7 @@ extension UniqueDeque where Element: ~Copyable {
|
||||
}
|
||||
}
|
||||
|
||||
#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW
|
||||
#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW
|
||||
/// Replaces the specified range of elements by at most `newItemCount` items
|
||||
/// generated by a producer.
|
||||
///
|
||||
@@ -462,7 +462,7 @@ extension UniqueDeque /* where Element: Copyable */ {
|
||||
}
|
||||
}
|
||||
|
||||
#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW
|
||||
#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW
|
||||
@inlinable
|
||||
internal mutating func _replace<
|
||||
C: Container<Element> & ~Copyable & ~Escapable
|
||||
@@ -506,7 +506,7 @@ extension UniqueDeque /* where Element: Copyable */ {
|
||||
}
|
||||
}
|
||||
|
||||
#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW
|
||||
#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW
|
||||
/// Replaces the specified subrange of elements by copying the elements of
|
||||
/// the given container.
|
||||
///
|
||||
@@ -584,7 +584,7 @@ extension UniqueDeque /* where Element: Copyable */ {
|
||||
removing: subrange, copyingCollection: items, newCount: items.count)
|
||||
}
|
||||
|
||||
#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW
|
||||
#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW
|
||||
/// Replaces the specified subrange of elements by copying the elements of
|
||||
/// the given container.
|
||||
///
|
||||
|
||||
Reference in new issue
Block a user