From 70a25f1f696758a6789e51d68ca0bbcdbb612e9f Mon Sep 17 00:00:00 2001 From: Karoy Lorentey Date: Thu, 26 Mar 2026 14:51:08 -0700 Subject: [PATCH] [ContainersPreview] Bump required toolchain to 6.4 for new protocols --- Package.swift | 2 +- .../RigidArray/RigidArray+Append.swift | 10 +++++----- .../RigidArray/RigidArray+Consumption.swift | 7 +++++++ .../RigidArray/RigidArray+Container.swift | 4 ++-- .../RigidArray/RigidArray+Initializers.swift | 4 ++-- .../RigidArray/RigidArray+Insertions.swift | 8 ++++---- .../RigidArray/RigidArray+Replacements.swift | 8 ++++---- .../UniqueArray/UniqueArray+Append.swift | 10 +++++----- .../UniqueArray/UniqueArray+Container.swift | 4 ++-- .../UniqueArray+Initializers.swift | 4 ++-- .../UniqueArray/UniqueArray+Insertions.swift | 6 +++--- .../UniqueArray+Replacements.swift | 6 +++--- .../BorrowingIteratorProtocol+Copy.swift | 2 +- ...rowingIteratorProtocol+ElementsEqual.swift | 2 +- .../BorrowingIteratorProtocol+Filter.swift | 2 +- .../BorrowingIteratorProtocol+Map.swift | 2 +- .../BorrowingIteratorProtocol+Reduce.swift | 2 +- ...orrowingIteratorProtocol+SpanwiseZip.swift | 2 +- .../Protocols/BorrowingIteratorProtocol.swift | 2 +- .../BorrowingSequence+Algorithms.swift | 2 +- .../BorrowingSequence+SpanIterator.swift | 2 +- ...rowingSequence+Standard Conformances.swift | 2 +- .../BorrowingSequence+Utilities.swift | 2 +- .../Protocols/BorrowingSequence.swift | 2 +- .../Container/BidirectionalContainer.swift | 2 +- .../Container/Container+Filter.swift | 2 +- .../Container/Container+SpanwiseZip.swift | 2 +- .../Protocols/Container/Container.swift | 2 +- .../Container/ContainerIterator.swift | 2 +- .../Container/DynamicContainer.swift | 2 +- .../Container/MutableContainer.swift | 2 +- .../Container/PermutableContainer.swift | 2 +- .../Container/RandomAccessContainer.swift | 2 +- .../Container/RangeExpression2.swift | 2 +- .../Container/RangeReplaceableContainer.swift | 2 +- .../Protocols/Drain+Map.swift | 2 +- .../Protocols/Drain+Reduce.swift | 2 +- .../ContainersPreview/Protocols/Drain.swift | 2 +- .../Protocols/Producer+Collect.swift | 2 +- .../Protocols/Producer+Filter.swift | 2 +- .../Protocols/Producer+Map.swift | 2 +- .../Protocols/Producer+Reduce.swift | 2 +- .../Protocols/Producer.swift | 2 +- .../RigidDeque/RigidDeque+Append.swift | 8 ++++---- .../RigidDeque/RigidDeque+Consumption.swift | 6 ++++++ .../RigidDeque/RigidDeque+Container.swift | 4 ++-- .../RigidDeque/RigidDeque+Equatable.swift | 2 +- .../RigidDeque/RigidDeque+Initializers.swift | 6 +++--- .../RigidDeque/RigidDeque+Insertions.swift | 8 ++++---- .../RigidDeque/RigidDeque+Prepend.swift | 6 +++--- .../RigidDeque/RigidDeque+Replacements.swift | 8 ++++---- .../UniqueDeque/UniqueDeque+Append.swift | 8 ++++---- .../UniqueDeque/UniqueDeque+Container.swift | 4 ++-- .../UniqueDeque+Initializers.swift | 8 ++++---- .../UniqueDeque/UniqueDeque+Insertions.swift | 8 ++++---- .../UniqueDeque/UniqueDeque+Prepend.swift | 8 ++++---- .../UniqueDeque+Replacements.swift | 8 ++++---- .../RigidArrayTests.swift | 10 +++++----- .../UniqueArrayTests.swift | 4 ++-- Tests/DequeTests/RigidDequeTests.swift | 20 +++++++++---------- Tests/DequeTests/UniqueDequeTests.swift | 2 +- .../Assertions+Containers.swift | 4 ++-- .../ConformanceCheckers/CheckContainer.swift | 2 +- .../MinimalTypes/CustomDrain.swift | 2 +- .../MinimalTypes/CustomProducer.swift | 2 +- .../MinimalTypes/StaccatoContainer.swift | 2 +- Xcode/Collections.xcodeproj/project.pbxproj | 8 ++++++++ 67 files changed, 152 insertions(+), 131 deletions(-) diff --git a/Package.swift b/Package.swift index 5c786dcb..2d4e3a78 100644 --- a/Package.swift +++ b/Package.swift @@ -120,7 +120,7 @@ let extraSettings: [SwiftSetting] = [ .enableExperimentalFeature("BuiltinModule"), .enableExperimentalFeature("Lifetimes"), .enableExperimentalFeature("InoutLifetimeDependence"), - .enableExperimentalFeature("SuppressedAssociatedTypesWithDefaults"), + .enableExperimentalFeature("SuppressedAssociatedTypesWithDefaults"), // Requires Swift 6.4 .enableExperimentalFeature("AddressableParameters"), .enableExperimentalFeature("AddressableTypes"), diff --git a/Sources/BasicContainers/RigidArray/RigidArray+Append.swift b/Sources/BasicContainers/RigidArray/RigidArray+Append.swift index 7399e501..f8cbd585 100644 --- a/Sources/BasicContainers/RigidArray/RigidArray+Append.swift +++ b/Sources/BasicContainers/RigidArray/RigidArray+Append.swift @@ -207,7 +207,7 @@ extension RigidArray where Element: ~Copyable { @available(SwiftStdlib 5.0, *) extension RigidArray 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 array. /// @@ -243,7 +243,7 @@ extension RigidArray 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 @@ -342,7 +342,7 @@ extension RigidArray { return it } -#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW @inlinable internal mutating func _append< Source: BorrowingSequence & ~Copyable & ~Escapable @@ -354,7 +354,7 @@ extension RigidArray { } #endif -#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 array. /// /// If the array does not have sufficient capacity to hold all items in the @@ -396,7 +396,7 @@ extension RigidArray { precondition(it.next() == nil, "RigidArray 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 array. /// /// If the array does not have sufficient capacity to hold all items in the diff --git a/Sources/BasicContainers/RigidArray/RigidArray+Consumption.swift b/Sources/BasicContainers/RigidArray/RigidArray+Consumption.swift index c13aef42..02ebeea9 100644 --- a/Sources/BasicContainers/RigidArray/RigidArray+Consumption.swift +++ b/Sources/BasicContainers/RigidArray/RigidArray+Consumption.swift @@ -187,8 +187,15 @@ extension RigidArray where Element: ~Copyable { } +#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW @available(SwiftStdlib 5.0, *) extension RigidArray.SubrangeConsumer: Drain where Element: ~Copyable { +} +#endif + + +@available(SwiftStdlib 5.0, *) +extension RigidArray.SubrangeConsumer where Element: ~Copyable { @inlinable @_lifetime(&self) @_lifetime(self: copy self) diff --git a/Sources/BasicContainers/RigidArray/RigidArray+Container.swift b/Sources/BasicContainers/RigidArray/RigidArray+Container.swift index c5b4e9ca..b7fe8e75 100644 --- a/Sources/BasicContainers/RigidArray/RigidArray+Container.swift +++ b/Sources/BasicContainers/RigidArray/RigidArray+Container.swift @@ -18,7 +18,7 @@ import ContainersPreview #if compiler(>=6.2) -#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW @available(SwiftStdlib 5.0, *) extension RigidArray: BorrowingSequence where Element: ~Copyable { public typealias BorrowingIterator = SpanIterator @@ -34,7 +34,7 @@ extension RigidArray: BorrowingSequence where Element: ~Copyable { } #endif -#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW @available(SwiftStdlib 5.0, *) extension RigidArray: Container where Element: ~Copyable {} diff --git a/Sources/BasicContainers/RigidArray/RigidArray+Initializers.swift b/Sources/BasicContainers/RigidArray/RigidArray+Initializers.swift index ba28a5cb..a3ab34f6 100644 --- a/Sources/BasicContainers/RigidArray/RigidArray+Initializers.swift +++ b/Sources/BasicContainers/RigidArray/RigidArray+Initializers.swift @@ -113,7 +113,7 @@ extension RigidArray /*where Element: Copyable*/ { self.append(copying: contents) } -#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW /// Creates a new array with the specified capacity, holding a copy /// of the contents of a given container. /// @@ -134,7 +134,7 @@ extension RigidArray /*where Element: Copyable*/ { #endif -#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW /// Creates a new array with the specified capacity, holding a copy /// of the contents of a given container. /// diff --git a/Sources/BasicContainers/RigidArray/RigidArray+Insertions.swift b/Sources/BasicContainers/RigidArray/RigidArray+Insertions.swift index d83653b2..87e375c8 100644 --- a/Sources/BasicContainers/RigidArray/RigidArray+Insertions.swift +++ b/Sources/BasicContainers/RigidArray/RigidArray+Insertions.swift @@ -268,7 +268,7 @@ extension RigidArray where Element: ~Copyable { @available(SwiftStdlib 5.0, *) extension RigidArray 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 /// array, starting at the given index. /// @@ -404,7 +404,7 @@ extension RigidArray { } } -#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW @_alwaysEmitIntoClient internal mutating func _insertContainer< C: Container & ~Copyable & ~Escapable @@ -451,7 +451,7 @@ extension RigidArray { _count += newCount } -#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW /// Copies the elements of a container into this array at the specified /// position. /// @@ -511,7 +511,7 @@ extension RigidArray { at: index, copying: newElements, newCount: newElements.count) } -#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW /// Copies the elements of a container into this array at the specified /// position. /// diff --git a/Sources/BasicContainers/RigidArray/RigidArray+Replacements.swift b/Sources/BasicContainers/RigidArray/RigidArray+Replacements.swift index e47e38f3..5da64cc6 100644 --- a/Sources/BasicContainers/RigidArray/RigidArray+Replacements.swift +++ b/Sources/BasicContainers/RigidArray/RigidArray+Replacements.swift @@ -408,7 +408,7 @@ extension RigidArray where Element: ~Copyable { @available(SwiftStdlib 5.0, *) extension RigidArray 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. /// @@ -579,7 +579,7 @@ extension RigidArray { } } -#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW @inlinable internal mutating func _replace< C: Container & ~Copyable & ~Escapable @@ -631,7 +631,7 @@ extension RigidArray { } -#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. /// @@ -711,7 +711,7 @@ extension RigidArray { newCount: newElements.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. /// diff --git a/Sources/BasicContainers/UniqueArray/UniqueArray+Append.swift b/Sources/BasicContainers/UniqueArray/UniqueArray+Append.swift index 963087ec..9730f069 100644 --- a/Sources/BasicContainers/UniqueArray/UniqueArray+Append.swift +++ b/Sources/BasicContainers/UniqueArray/UniqueArray+Append.swift @@ -179,7 +179,7 @@ extension UniqueArray where Element: ~Copyable { } #endif -#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 array. /// @@ -212,7 +212,7 @@ extension UniqueArray 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 @@ -303,7 +303,7 @@ extension UniqueArray { _storage.append(copying: newElements) } -#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW @inlinable internal mutating func _append< Source: BorrowingSequence & ~Copyable & ~Escapable @@ -322,7 +322,7 @@ extension UniqueArray { // FIXME: Add _append(copyingContainer:), forwarding to the same method on RigidArray #endif -#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 array. /// /// If the array does not have sufficient capacity to hold enough elements, @@ -378,7 +378,7 @@ extension UniqueArray { } } -#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW /// Copies the elements of a container to the end of this array. /// /// If the array does not have sufficient capacity to hold enough elements, diff --git a/Sources/BasicContainers/UniqueArray/UniqueArray+Container.swift b/Sources/BasicContainers/UniqueArray/UniqueArray+Container.swift index cee324ca..816b19df 100644 --- a/Sources/BasicContainers/UniqueArray/UniqueArray+Container.swift +++ b/Sources/BasicContainers/UniqueArray/UniqueArray+Container.swift @@ -18,7 +18,7 @@ import ContainersPreview #if compiler(>=6.2) -#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW @available(SwiftStdlib 5.0, *) extension UniqueArray: BorrowingSequence where Element: ~Copyable { public typealias BorrowingIterator = RigidArray.BorrowingIterator @@ -34,7 +34,7 @@ extension UniqueArray: BorrowingSequence where Element: ~Copyable { } #endif -#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW @available(SwiftStdlib 5.0, *) extension UniqueArray: Container where Element: ~Copyable {} diff --git a/Sources/BasicContainers/UniqueArray/UniqueArray+Initializers.swift b/Sources/BasicContainers/UniqueArray/UniqueArray+Initializers.swift index ee2ffdb9..632e0ea7 100644 --- a/Sources/BasicContainers/UniqueArray/UniqueArray+Initializers.swift +++ b/Sources/BasicContainers/UniqueArray/UniqueArray+Initializers.swift @@ -93,7 +93,7 @@ extension UniqueArray where Element: ~Copyable { @available(SwiftStdlib 5.0, *) extension UniqueArray /*where Element: Copyable*/ { -#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW /// Creates a new array with the specified initial capacity, holding a copy /// of the contents of a given borrowing sequence. /// @@ -130,7 +130,7 @@ extension UniqueArray /*where Element: Copyable*/ { self.append(copying: contents) } -#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW /// Creates a new array with the specified initial capacity, holding a copy /// of the contents of a given container. /// diff --git a/Sources/BasicContainers/UniqueArray/UniqueArray+Insertions.swift b/Sources/BasicContainers/UniqueArray/UniqueArray+Insertions.swift index 7013cceb..c5d7ffbe 100644 --- a/Sources/BasicContainers/UniqueArray/UniqueArray+Insertions.swift +++ b/Sources/BasicContainers/UniqueArray/UniqueArray+Insertions.swift @@ -229,7 +229,7 @@ extension UniqueArray where Element: ~Copyable { @available(SwiftStdlib 5.0, *) extension UniqueArray 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 /// array, starting at the given index. /// @@ -366,7 +366,7 @@ extension UniqueArray { _storage.insert(copying: newElements, at: index) } -#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW /// Copies the elements of a container into this array at the specified /// position. /// @@ -433,7 +433,7 @@ extension UniqueArray { at: index, copying: newElements, newCount: newCount) } -#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW /// Copies the elements of a container into this array at the specified /// position. /// diff --git a/Sources/BasicContainers/UniqueArray/UniqueArray+Replacements.swift b/Sources/BasicContainers/UniqueArray/UniqueArray+Replacements.swift index 75e5e9fd..d3d9f319 100644 --- a/Sources/BasicContainers/UniqueArray/UniqueArray+Replacements.swift +++ b/Sources/BasicContainers/UniqueArray/UniqueArray+Replacements.swift @@ -345,7 +345,7 @@ extension UniqueArray where Element: ~Copyable { @available(SwiftStdlib 5.0, *) extension UniqueArray 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 `maximumCount` items /// generated by a producer. /// @@ -520,7 +520,7 @@ extension UniqueArray { _storage.replace(removing: subrange, copying: newElements) } -#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. /// @@ -610,7 +610,7 @@ extension UniqueArray { newCount: c) } -#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. /// diff --git a/Sources/ContainersPreview/Protocols/BorrowingIteratorProtocol+Copy.swift b/Sources/ContainersPreview/Protocols/BorrowingIteratorProtocol+Copy.swift index 56328408..5b06a0e2 100644 --- a/Sources/ContainersPreview/Protocols/BorrowingIteratorProtocol+Copy.swift +++ b/Sources/ContainersPreview/Protocols/BorrowingIteratorProtocol+Copy.swift @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#if compiler(>=6.3) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW @available(SwiftStdlib 5.0, *) extension BorrowingIteratorProtocol diff --git a/Sources/ContainersPreview/Protocols/BorrowingIteratorProtocol+ElementsEqual.swift b/Sources/ContainersPreview/Protocols/BorrowingIteratorProtocol+ElementsEqual.swift index 21ddb4aa..23c96129 100644 --- a/Sources/ContainersPreview/Protocols/BorrowingIteratorProtocol+ElementsEqual.swift +++ b/Sources/ContainersPreview/Protocols/BorrowingIteratorProtocol+ElementsEqual.swift @@ -15,7 +15,7 @@ import InternalCollectionsUtilities #endif -#if compiler(>=6.2) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW @available(SwiftStdlib 5.0, *) extension BorrowingSequence where Self: ~Copyable & ~Escapable, Element: Equatable { diff --git a/Sources/ContainersPreview/Protocols/BorrowingIteratorProtocol+Filter.swift b/Sources/ContainersPreview/Protocols/BorrowingIteratorProtocol+Filter.swift index 7afa0f68..8a3f357b 100644 --- a/Sources/ContainersPreview/Protocols/BorrowingIteratorProtocol+Filter.swift +++ b/Sources/ContainersPreview/Protocols/BorrowingIteratorProtocol+Filter.swift @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#if compiler(>=6.2) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW @available(SwiftStdlib 5.0, *) extension BorrowingIteratorProtocol where Self: ~Copyable & ~Escapable { diff --git a/Sources/ContainersPreview/Protocols/BorrowingIteratorProtocol+Map.swift b/Sources/ContainersPreview/Protocols/BorrowingIteratorProtocol+Map.swift index 0a9e5a16..93ccb88d 100644 --- a/Sources/ContainersPreview/Protocols/BorrowingIteratorProtocol+Map.swift +++ b/Sources/ContainersPreview/Protocols/BorrowingIteratorProtocol+Map.swift @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#if compiler(>=6.3) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW @available(SwiftStdlib 5.0, *) extension BorrowingIteratorProtocol where Self: ~Copyable & ~Escapable { diff --git a/Sources/ContainersPreview/Protocols/BorrowingIteratorProtocol+Reduce.swift b/Sources/ContainersPreview/Protocols/BorrowingIteratorProtocol+Reduce.swift index 8ddf16c4..a3813638 100644 --- a/Sources/ContainersPreview/Protocols/BorrowingIteratorProtocol+Reduce.swift +++ b/Sources/ContainersPreview/Protocols/BorrowingIteratorProtocol+Reduce.swift @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#if compiler(>=6.2) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW @available(SwiftStdlib 5.0, *) extension BorrowingIteratorProtocol where Self: ~Copyable & ~Escapable { diff --git a/Sources/ContainersPreview/Protocols/BorrowingIteratorProtocol+SpanwiseZip.swift b/Sources/ContainersPreview/Protocols/BorrowingIteratorProtocol+SpanwiseZip.swift index da66cf5f..d5bb703a 100644 --- a/Sources/ContainersPreview/Protocols/BorrowingIteratorProtocol+SpanwiseZip.swift +++ b/Sources/ContainersPreview/Protocols/BorrowingIteratorProtocol+SpanwiseZip.swift @@ -15,7 +15,7 @@ import InternalCollectionsUtilities #endif -#if compiler(>=6.2) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW @available(SwiftStdlib 5.0, *) extension BorrowingIteratorProtocol where Self: ~Copyable & ~Escapable { diff --git a/Sources/ContainersPreview/Protocols/BorrowingIteratorProtocol.swift b/Sources/ContainersPreview/Protocols/BorrowingIteratorProtocol.swift index e27119fd..ab6fb791 100644 --- a/Sources/ContainersPreview/Protocols/BorrowingIteratorProtocol.swift +++ b/Sources/ContainersPreview/Protocols/BorrowingIteratorProtocol.swift @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#if compiler(>=6.2) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW #if !COLLECTIONS_SINGLE_MODULE import InternalCollectionsUtilities diff --git a/Sources/ContainersPreview/Protocols/BorrowingSequence+Algorithms.swift b/Sources/ContainersPreview/Protocols/BorrowingSequence+Algorithms.swift index 9cd3d90d..f072a2b3 100644 --- a/Sources/ContainersPreview/Protocols/BorrowingSequence+Algorithms.swift +++ b/Sources/ContainersPreview/Protocols/BorrowingSequence+Algorithms.swift @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#if compiler(>=6.2) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW @available(SwiftStdlib 5.0, *) extension BorrowingSequence where Self: ~Copyable & ~Escapable, Element: ~Copyable { diff --git a/Sources/ContainersPreview/Protocols/BorrowingSequence+SpanIterator.swift b/Sources/ContainersPreview/Protocols/BorrowingSequence+SpanIterator.swift index 095f60d8..0e7f2a30 100644 --- a/Sources/ContainersPreview/Protocols/BorrowingSequence+SpanIterator.swift +++ b/Sources/ContainersPreview/Protocols/BorrowingSequence+SpanIterator.swift @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#if compiler(>=6.2) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW /// A borrowing iterator that provides access to the elements of a single /// span through a `BorrowingIteratorProtocol` interface. diff --git a/Sources/ContainersPreview/Protocols/BorrowingSequence+Standard Conformances.swift b/Sources/ContainersPreview/Protocols/BorrowingSequence+Standard Conformances.swift index b2a953a8..7bc2769d 100644 --- a/Sources/ContainersPreview/Protocols/BorrowingSequence+Standard Conformances.swift +++ b/Sources/ContainersPreview/Protocols/BorrowingSequence+Standard Conformances.swift @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#if compiler(>=6.2) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW @available(SwiftStdlib 5.0, *) extension Span: BorrowingSequence where Element: ~Copyable { diff --git a/Sources/ContainersPreview/Protocols/BorrowingSequence+Utilities.swift b/Sources/ContainersPreview/Protocols/BorrowingSequence+Utilities.swift index 7f64032b..1451d9ec 100644 --- a/Sources/ContainersPreview/Protocols/BorrowingSequence+Utilities.swift +++ b/Sources/ContainersPreview/Protocols/BorrowingSequence+Utilities.swift @@ -15,7 +15,7 @@ import InternalCollectionsUtilities #endif -#if compiler(>=6.2) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW @available(SwiftStdlib 5.0, *) extension BorrowingSequence where Self: ~Copyable & ~Escapable, Element: Copyable { diff --git a/Sources/ContainersPreview/Protocols/BorrowingSequence.swift b/Sources/ContainersPreview/Protocols/BorrowingSequence.swift index bcb6b675..fc05504a 100644 --- a/Sources/ContainersPreview/Protocols/BorrowingSequence.swift +++ b/Sources/ContainersPreview/Protocols/BorrowingSequence.swift @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#if compiler(>=6.2) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW @available(SwiftStdlib 5.0, *) public protocol BorrowingSequence: ~Copyable, ~Escapable { diff --git a/Sources/ContainersPreview/Protocols/Container/BidirectionalContainer.swift b/Sources/ContainersPreview/Protocols/Container/BidirectionalContainer.swift index 837e992a..0f5b5ac2 100644 --- a/Sources/ContainersPreview/Protocols/Container/BidirectionalContainer.swift +++ b/Sources/ContainersPreview/Protocols/Container/BidirectionalContainer.swift @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#if compiler(>=6.2) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW @available(SwiftStdlib 5.0, *) public protocol BidirectionalContainer: Container, ~Copyable, ~Escapable { diff --git a/Sources/ContainersPreview/Protocols/Container/Container+Filter.swift b/Sources/ContainersPreview/Protocols/Container/Container+Filter.swift index ad6681bf..d504b164 100644 --- a/Sources/ContainersPreview/Protocols/Container/Container+Filter.swift +++ b/Sources/ContainersPreview/Protocols/Container/Container+Filter.swift @@ -15,7 +15,7 @@ import InternalCollectionsUtilities #endif -#if compiler(>=6.3) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW @available(SwiftStdlib 5.0, *) extension Container where Self: ~Copyable /*& ~Escapable*/ { diff --git a/Sources/ContainersPreview/Protocols/Container/Container+SpanwiseZip.swift b/Sources/ContainersPreview/Protocols/Container/Container+SpanwiseZip.swift index a408faf4..86c1c48f 100644 --- a/Sources/ContainersPreview/Protocols/Container/Container+SpanwiseZip.swift +++ b/Sources/ContainersPreview/Protocols/Container/Container+SpanwiseZip.swift @@ -15,7 +15,7 @@ import InternalCollectionsUtilities #endif -#if compiler(>=6.2) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW @available(SwiftStdlib 6.2, *) extension Container where Self: ~Copyable & ~Escapable { diff --git a/Sources/ContainersPreview/Protocols/Container/Container.swift b/Sources/ContainersPreview/Protocols/Container/Container.swift index a26d3219..1e572732 100644 --- a/Sources/ContainersPreview/Protocols/Container/Container.swift +++ b/Sources/ContainersPreview/Protocols/Container/Container.swift @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#if compiler(>=6.2) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW @available(SwiftStdlib 5.0, *) public protocol Container: BorrowingSequence, ~Copyable, ~Escapable { diff --git a/Sources/ContainersPreview/Protocols/Container/ContainerIterator.swift b/Sources/ContainersPreview/Protocols/Container/ContainerIterator.swift index 9d67d846..3a58f568 100644 --- a/Sources/ContainersPreview/Protocols/Container/ContainerIterator.swift +++ b/Sources/ContainersPreview/Protocols/Container/ContainerIterator.swift @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#if compiler(>=6.2) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW @available(SwiftStdlib 5.0, *) extension Container diff --git a/Sources/ContainersPreview/Protocols/Container/DynamicContainer.swift b/Sources/ContainersPreview/Protocols/Container/DynamicContainer.swift index 5713b1ee..f1e63083 100644 --- a/Sources/ContainersPreview/Protocols/Container/DynamicContainer.swift +++ b/Sources/ContainersPreview/Protocols/Container/DynamicContainer.swift @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#if compiler(>=6.3) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW @available(SwiftStdlib 5.0, *) public protocol DynamicContainer: RangeReplaceableContainer, ~Copyable { diff --git a/Sources/ContainersPreview/Protocols/Container/MutableContainer.swift b/Sources/ContainersPreview/Protocols/Container/MutableContainer.swift index 232c3de3..ff2a1f90 100644 --- a/Sources/ContainersPreview/Protocols/Container/MutableContainer.swift +++ b/Sources/ContainersPreview/Protocols/Container/MutableContainer.swift @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#if compiler(>=6.2) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW @available(SwiftStdlib 5.0, *) public protocol MutableContainer: PermutableContainer, ~Copyable, ~Escapable { diff --git a/Sources/ContainersPreview/Protocols/Container/PermutableContainer.swift b/Sources/ContainersPreview/Protocols/Container/PermutableContainer.swift index 8269b38d..41fed7df 100644 --- a/Sources/ContainersPreview/Protocols/Container/PermutableContainer.swift +++ b/Sources/ContainersPreview/Protocols/Container/PermutableContainer.swift @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#if compiler(>=6.2) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW @available(SwiftStdlib 5.0, *) public protocol PermutableContainer: Container, ~Copyable, ~Escapable { diff --git a/Sources/ContainersPreview/Protocols/Container/RandomAccessContainer.swift b/Sources/ContainersPreview/Protocols/Container/RandomAccessContainer.swift index 19ea771f..6a32157a 100644 --- a/Sources/ContainersPreview/Protocols/Container/RandomAccessContainer.swift +++ b/Sources/ContainersPreview/Protocols/Container/RandomAccessContainer.swift @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#if compiler(>=6.2) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW @available(SwiftStdlib 6.2, *) public protocol RandomAccessContainer diff --git a/Sources/ContainersPreview/Protocols/Container/RangeExpression2.swift b/Sources/ContainersPreview/Protocols/Container/RangeExpression2.swift index e487ac81..c4c238b7 100644 --- a/Sources/ContainersPreview/Protocols/Container/RangeExpression2.swift +++ b/Sources/ContainersPreview/Protocols/Container/RangeExpression2.swift @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#if compiler(>=6.2) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW // FIXME: Figure out if it would be possible to add the container-based // `relative(to:)` to the existing `RangeExpression`. diff --git a/Sources/ContainersPreview/Protocols/Container/RangeReplaceableContainer.swift b/Sources/ContainersPreview/Protocols/Container/RangeReplaceableContainer.swift index efa4a882..25ee34af 100644 --- a/Sources/ContainersPreview/Protocols/Container/RangeReplaceableContainer.swift +++ b/Sources/ContainersPreview/Protocols/Container/RangeReplaceableContainer.swift @@ -15,7 +15,7 @@ import InternalCollectionsUtilities #endif -#if compiler(>=6.3) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW //MARK: - Protocol Definition diff --git a/Sources/ContainersPreview/Protocols/Drain+Map.swift b/Sources/ContainersPreview/Protocols/Drain+Map.swift index b3460139..728d7d77 100644 --- a/Sources/ContainersPreview/Protocols/Drain+Map.swift +++ b/Sources/ContainersPreview/Protocols/Drain+Map.swift @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#if compiler(>=6.3) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW @available(SwiftStdlib 5.0, *) extension Drain where Self: ~Copyable & ~Escapable { diff --git a/Sources/ContainersPreview/Protocols/Drain+Reduce.swift b/Sources/ContainersPreview/Protocols/Drain+Reduce.swift index f542f81d..4933fdd7 100644 --- a/Sources/ContainersPreview/Protocols/Drain+Reduce.swift +++ b/Sources/ContainersPreview/Protocols/Drain+Reduce.swift @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#if compiler(>=6.2) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW @available(SwiftStdlib 5.0, *) extension Drain where Self: ~Copyable & ~Escapable { diff --git a/Sources/ContainersPreview/Protocols/Drain.swift b/Sources/ContainersPreview/Protocols/Drain.swift index c2212dc4..041f37e9 100644 --- a/Sources/ContainersPreview/Protocols/Drain.swift +++ b/Sources/ContainersPreview/Protocols/Drain.swift @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#if compiler(>=6.2) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW /// A type that supplies the values of an in-place consumable sequence through /// a series of `InputSpan` instances. This iterator-like construct allows diff --git a/Sources/ContainersPreview/Protocols/Producer+Collect.swift b/Sources/ContainersPreview/Protocols/Producer+Collect.swift index 36c61817..0204f632 100644 --- a/Sources/ContainersPreview/Protocols/Producer+Collect.swift +++ b/Sources/ContainersPreview/Protocols/Producer+Collect.swift @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#if compiler(>=6.3) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW @available(SwiftStdlib 5.0, *) extension Producer where Self: ~Copyable & ~Escapable { diff --git a/Sources/ContainersPreview/Protocols/Producer+Filter.swift b/Sources/ContainersPreview/Protocols/Producer+Filter.swift index 205129da..6afc27f2 100644 --- a/Sources/ContainersPreview/Protocols/Producer+Filter.swift +++ b/Sources/ContainersPreview/Protocols/Producer+Filter.swift @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#if compiler(>=6.2) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW @available(SwiftStdlib 5.0, *) extension Producer where Self: ~Copyable & ~Escapable { diff --git a/Sources/ContainersPreview/Protocols/Producer+Map.swift b/Sources/ContainersPreview/Protocols/Producer+Map.swift index 345ec5db..e45867e2 100644 --- a/Sources/ContainersPreview/Protocols/Producer+Map.swift +++ b/Sources/ContainersPreview/Protocols/Producer+Map.swift @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#if compiler(>=6.2) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW @available(SwiftStdlib 5.0, *) extension Producer where Self: ~Copyable & ~Escapable { diff --git a/Sources/ContainersPreview/Protocols/Producer+Reduce.swift b/Sources/ContainersPreview/Protocols/Producer+Reduce.swift index ebcf2a87..d00448b9 100644 --- a/Sources/ContainersPreview/Protocols/Producer+Reduce.swift +++ b/Sources/ContainersPreview/Protocols/Producer+Reduce.swift @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#if compiler(>=6.2) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW @available(SwiftStdlib 5.0, *) extension Producer where Self: ~Copyable & ~Escapable { diff --git a/Sources/ContainersPreview/Protocols/Producer.swift b/Sources/ContainersPreview/Protocols/Producer.swift index 6bd546a2..02afb6b5 100644 --- a/Sources/ContainersPreview/Protocols/Producer.swift +++ b/Sources/ContainersPreview/Protocols/Producer.swift @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#if compiler(>=6.2) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW @_alwaysEmitIntoClient @_transparent diff --git a/Sources/DequeModule/RigidDeque/RigidDeque+Append.swift b/Sources/DequeModule/RigidDeque/RigidDeque+Append.swift index 6ade97cc..8663a845 100644 --- a/Sources/DequeModule/RigidDeque/RigidDeque+Append.swift +++ b/Sources/DequeModule/RigidDeque/RigidDeque+Append.swift @@ -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 & ~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 diff --git a/Sources/DequeModule/RigidDeque/RigidDeque+Consumption.swift b/Sources/DequeModule/RigidDeque/RigidDeque+Consumption.swift index 8a657607..4b8408c7 100644 --- a/Sources/DequeModule/RigidDeque/RigidDeque+Consumption.swift +++ b/Sources/DequeModule/RigidDeque/RigidDeque+Consumption.swift @@ -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) diff --git a/Sources/DequeModule/RigidDeque/RigidDeque+Container.swift b/Sources/DequeModule/RigidDeque/RigidDeque+Container.swift index 49ff1c3a..b58eb69c 100644 --- a/Sources/DequeModule/RigidDeque/RigidDeque+Container.swift +++ b/Sources/DequeModule/RigidDeque/RigidDeque+Container.swift @@ -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 {} diff --git a/Sources/DequeModule/RigidDeque/RigidDeque+Equatable.swift b/Sources/DequeModule/RigidDeque/RigidDeque+Equatable.swift index 06646b03..d47b7dea 100644 --- a/Sources/DequeModule/RigidDeque/RigidDeque+Equatable.swift +++ b/Sources/DequeModule/RigidDeque/RigidDeque+Equatable.swift @@ -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 { diff --git a/Sources/DequeModule/RigidDeque/RigidDeque+Initializers.swift b/Sources/DequeModule/RigidDeque/RigidDeque+Initializers.swift index aaa63c1b..5917378c 100644 --- a/Sources/DequeModule/RigidDeque/RigidDeque+Initializers.swift +++ b/Sources/DequeModule/RigidDeque/RigidDeque+Initializers.swift @@ -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. /// diff --git a/Sources/DequeModule/RigidDeque/RigidDeque+Insertions.swift b/Sources/DequeModule/RigidDeque/RigidDeque+Insertions.swift index 48b69967..2c33da12 100644 --- a/Sources/DequeModule/RigidDeque/RigidDeque+Insertions.swift +++ b/Sources/DequeModule/RigidDeque/RigidDeque+Insertions.swift @@ -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 & ~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. /// diff --git a/Sources/DequeModule/RigidDeque/RigidDeque+Prepend.swift b/Sources/DequeModule/RigidDeque/RigidDeque+Prepend.swift index 292b4f20..ba989140 100644 --- a/Sources/DequeModule/RigidDeque/RigidDeque+Prepend.swift +++ b/Sources/DequeModule/RigidDeque/RigidDeque+Prepend.swift @@ -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 & ~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 diff --git a/Sources/DequeModule/RigidDeque/RigidDeque+Replacements.swift b/Sources/DequeModule/RigidDeque/RigidDeque+Replacements.swift index f8218011..2382b22c 100644 --- a/Sources/DequeModule/RigidDeque/RigidDeque+Replacements.swift +++ b/Sources/DequeModule/RigidDeque/RigidDeque+Replacements.swift @@ -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 & ~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. /// diff --git a/Sources/DequeModule/UniqueDeque/UniqueDeque+Append.swift b/Sources/DequeModule/UniqueDeque/UniqueDeque+Append.swift index 3a7cdb3a..ed70a1cc 100644 --- a/Sources/DequeModule/UniqueDeque/UniqueDeque+Append.swift +++ b/Sources/DequeModule/UniqueDeque/UniqueDeque+Append.swift @@ -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 & ~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 diff --git a/Sources/DequeModule/UniqueDeque/UniqueDeque+Container.swift b/Sources/DequeModule/UniqueDeque/UniqueDeque+Container.swift index 21ef158c..dcce942d 100644 --- a/Sources/DequeModule/UniqueDeque/UniqueDeque+Container.swift +++ b/Sources/DequeModule/UniqueDeque/UniqueDeque+Container.swift @@ -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.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 {} diff --git a/Sources/DequeModule/UniqueDeque/UniqueDeque+Initializers.swift b/Sources/DequeModule/UniqueDeque/UniqueDeque+Initializers.swift index 45f62428..7f4a1310 100644 --- a/Sources/DequeModule/UniqueDeque/UniqueDeque+Initializers.swift +++ b/Sources/DequeModule/UniqueDeque/UniqueDeque+Initializers.swift @@ -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. /// diff --git a/Sources/DequeModule/UniqueDeque/UniqueDeque+Insertions.swift b/Sources/DequeModule/UniqueDeque/UniqueDeque+Insertions.swift index a838f15c..8558d279 100644 --- a/Sources/DequeModule/UniqueDeque/UniqueDeque+Insertions.swift +++ b/Sources/DequeModule/UniqueDeque/UniqueDeque+Insertions.swift @@ -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 & ~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. /// diff --git a/Sources/DequeModule/UniqueDeque/UniqueDeque+Prepend.swift b/Sources/DequeModule/UniqueDeque/UniqueDeque+Prepend.swift index 24f55875..0b1c694b 100644 --- a/Sources/DequeModule/UniqueDeque/UniqueDeque+Prepend.swift +++ b/Sources/DequeModule/UniqueDeque/UniqueDeque+Prepend.swift @@ -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 & ~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 diff --git a/Sources/DequeModule/UniqueDeque/UniqueDeque+Replacements.swift b/Sources/DequeModule/UniqueDeque/UniqueDeque+Replacements.swift index 61918389..55ee6d71 100644 --- a/Sources/DequeModule/UniqueDeque/UniqueDeque+Replacements.swift +++ b/Sources/DequeModule/UniqueDeque/UniqueDeque+Replacements.swift @@ -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 & ~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. /// diff --git a/Tests/BasicContainersTests/RigidArrayTests.swift b/Tests/BasicContainersTests/RigidArrayTests.swift index 34d6d21e..298e979c 100644 --- a/Tests/BasicContainersTests/RigidArrayTests.swift +++ b/Tests/BasicContainersTests/RigidArrayTests.swift @@ -22,7 +22,7 @@ import BasicContainers #if compiler(>=6.2) -#if compiler(<6.3) || !COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(<6.4) || !COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW /// Check if `left` and `right` contain equal elements in the same order. @available(SwiftStdlib 5.0, *) internal func expectIterableContents< @@ -75,7 +75,7 @@ class RigidArrayTests: CollectionTestCase { let expected = (0 ..< layout.count).map { tracker.instance(for: $0) } expectEqual(tracker.instances, 2 * layout.count) expectIterableContents(items, equalTo: expected) -#if compiler(>=6.2) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW checkIterable(items, expectedContents: expected) #endif } @@ -1179,7 +1179,7 @@ class RigidArrayTests: CollectionTestCase { } } -#if compiler(>=6.3) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW func test_insert_copying_Container() { withSomeArrayLayouts("layout", ofCapacities: [0, 5, 10]) { layout in withEvery("i", in: 0 ... layout.count) { i in @@ -1327,7 +1327,7 @@ class RigidArrayTests: CollectionTestCase { } } -#if compiler(>=6.3) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW func test_replace_Container() { withSomeArrayLayouts("layout", ofCapacities: [0, 5, 10]) { layout in withEveryRange("range", in: 0 ..< layout.count) { range in @@ -1358,7 +1358,7 @@ class RigidArrayTests: CollectionTestCase { } #endif -#if compiler(>=6.3) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW func test_borrowing_map() { let c = 100 let items = RigidArray(capacity: c, copying: 0 ..< c) diff --git a/Tests/BasicContainersTests/UniqueArrayTests.swift b/Tests/BasicContainersTests/UniqueArrayTests.swift index d288478b..3413f748 100644 --- a/Tests/BasicContainersTests/UniqueArrayTests.swift +++ b/Tests/BasicContainersTests/UniqueArrayTests.swift @@ -21,7 +21,7 @@ import BasicContainers #if compiler(>=6.2) -#if compiler(<6.3) || !COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(<6.4) || !COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW /// Check if `left` and `right` contain equal elements in the same order. @available(SwiftStdlib 5.0, *) public func expectIterableContents< @@ -78,7 +78,7 @@ class UniqueArrayTests: CollectionTestCase { let expected = (0 ..< layout.count).map { tracker.instance(for: $0) } expectEqual(tracker.instances, 2 * layout.count) expectIterableContents(items, equalTo: expected) -#if compiler(>=6.2) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW checkIterable(items, expectedContents: expected) #endif } diff --git a/Tests/DequeTests/RigidDequeTests.swift b/Tests/DequeTests/RigidDequeTests.swift index b1ee2e3c..555d771a 100644 --- a/Tests/DequeTests/RigidDequeTests.swift +++ b/Tests/DequeTests/RigidDequeTests.swift @@ -22,7 +22,7 @@ import ContainersPreview #endif #if compiler(>=6.2) -#if compiler(<6.3) || !COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(<6.4) || !COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW /// Check if `left` and `right` contain equal elements in the same order. @available(SwiftStdlib 5.0, *) internal func expectIterableContents< @@ -345,7 +345,7 @@ final class RigidDequeTests: CollectionTestCase { } } -#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW func test_initFromProducer() { withEvery("count", in: 0 ..< 10) { count in withEvery("capacity", in: [count, count + 1, 2 * count] as Set) { capacity in @@ -414,7 +414,7 @@ final class RigidDequeTests: CollectionTestCase { } } -#if compiler(>=6.3) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW func test_initCopyingBorrowingSequence() { withEvery("c", in: 0 ..< 10) { c in withEvery("capacity", in: [c, c + 1]) { capacity in @@ -767,7 +767,7 @@ final class RigidDequeTests: CollectionTestCase { } } -#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW func test_prepend_Producer_full() { withEveryDeque("layout", ofCapacities: [0, 1, 2, 3, 5]) { layout in withEvery("producerSize", in: 0 ..< 6) { producerSize in @@ -792,7 +792,7 @@ final class RigidDequeTests: CollectionTestCase { } #endif -#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW func test_append_Producer() { withEveryDeque("layout", ofCapacities: [0, 1, 2, 3, 5]) { layout in withEvery("producerSize", in: 0 ..< layout.freeCapacity) { producerSize in @@ -817,7 +817,7 @@ final class RigidDequeTests: CollectionTestCase { } #endif -#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW func test_prepend_Producer_failing() { withEveryDeque("layout", ofCapacities: [0, 1, 2, 3, 5]) { layout in guard layout.freeCapacity > 0 else { return } @@ -848,7 +848,7 @@ final class RigidDequeTests: CollectionTestCase { } #endif -#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW func test_append_Producer_failing() { withEveryDeque("layout", ofCapacities: [0, 1, 2, 3, 5]) { layout in guard layout.freeCapacity > 0 else { return } @@ -1174,7 +1174,7 @@ final class RigidDequeTests: CollectionTestCase { } } -#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW func test_insert_fromProducer() { withEveryDeque("layout", ofCapacities: [0, 1, 2, 3, 5]) { layout in withEvery("i", in: 0 ... layout.count) { i in @@ -1206,7 +1206,7 @@ final class RigidDequeTests: CollectionTestCase { } #endif -#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW func test_insert_fromProducer_failing() { withEveryDeque("layout", ofCapacities: [0, 1, 2, 3, 5]) { layout in guard layout.freeCapacity > 0 else { return } @@ -1264,7 +1264,7 @@ final class RigidDequeTests: CollectionTestCase { } } -#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW func test_insert_RigidArray() { withEveryDeque("layout", ofCapacities: [0, 1, 2, 3, 5, 10]) { layout in withEvery("i", in: 0 ... layout.count) { i in diff --git a/Tests/DequeTests/UniqueDequeTests.swift b/Tests/DequeTests/UniqueDequeTests.swift index 2160da26..4cb63cf8 100644 --- a/Tests/DequeTests/UniqueDequeTests.swift +++ b/Tests/DequeTests/UniqueDequeTests.swift @@ -22,7 +22,7 @@ import ContainersPreview #endif #if compiler(>=6.2) -#if compiler(<6.3) || !COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(<6.4) || !COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW /// Check if `left` and `right` contain equal elements in the same order. @available(SwiftStdlib 5.0, *) internal func expectIterableContents< diff --git a/Tests/_CollectionsTestSupport/AssertionContexts/Assertions+Containers.swift b/Tests/_CollectionsTestSupport/AssertionContexts/Assertions+Containers.swift index 29beb425..5ceaa4c7 100644 --- a/Tests/_CollectionsTestSupport/AssertionContexts/Assertions+Containers.swift +++ b/Tests/_CollectionsTestSupport/AssertionContexts/Assertions+Containers.swift @@ -121,7 +121,7 @@ public func expectIterableContents< } } -#if compiler(>=6.3) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW /// Check if `left` contains lifetime tracked instances whose payloads equal /// the elements in `right`. @available(SwiftStdlib 5.0, *) @@ -217,7 +217,7 @@ public func expectIterablePayloads< } #endif -#if compiler(>=6.3) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW @available(SwiftStdlib 5.0, *) public func expectIterablesWithEquivalentElements< S1: BorrowingSequence & ~Copyable & ~Escapable, diff --git a/Tests/_CollectionsTestSupport/ConformanceCheckers/CheckContainer.swift b/Tests/_CollectionsTestSupport/ConformanceCheckers/CheckContainer.swift index 0fb3e6dd..fd60096e 100644 --- a/Tests/_CollectionsTestSupport/ConformanceCheckers/CheckContainer.swift +++ b/Tests/_CollectionsTestSupport/ConformanceCheckers/CheckContainer.swift @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#if compiler(>=6.2) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW import XCTest #if COLLECTIONS_SINGLE_MODULE import Collections diff --git a/Tests/_CollectionsTestSupport/MinimalTypes/CustomDrain.swift b/Tests/_CollectionsTestSupport/MinimalTypes/CustomDrain.swift index d9938c52..8b7d1404 100644 --- a/Tests/_CollectionsTestSupport/MinimalTypes/CustomDrain.swift +++ b/Tests/_CollectionsTestSupport/MinimalTypes/CustomDrain.swift @@ -19,7 +19,7 @@ import BasicContainers import ContainersPreview #endif -#if compiler(>=6.2) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW @available(SwiftStdlib 5.0, *) package struct CustomDrain: ~Copyable { diff --git a/Tests/_CollectionsTestSupport/MinimalTypes/CustomProducer.swift b/Tests/_CollectionsTestSupport/MinimalTypes/CustomProducer.swift index b9dfddb9..99315620 100644 --- a/Tests/_CollectionsTestSupport/MinimalTypes/CustomProducer.swift +++ b/Tests/_CollectionsTestSupport/MinimalTypes/CustomProducer.swift @@ -18,7 +18,7 @@ import InternalCollectionsUtilities import ContainersPreview #endif -#if compiler(>=6.2) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW @available(SwiftStdlib 5.0, *) package struct CustomProducer: ~Copyable { diff --git a/Tests/_CollectionsTestSupport/MinimalTypes/StaccatoContainer.swift b/Tests/_CollectionsTestSupport/MinimalTypes/StaccatoContainer.swift index 20edf640..37d68b59 100644 --- a/Tests/_CollectionsTestSupport/MinimalTypes/StaccatoContainer.swift +++ b/Tests/_CollectionsTestSupport/MinimalTypes/StaccatoContainer.swift @@ -18,7 +18,7 @@ import BasicContainers import ContainersPreview #endif -#if compiler(>=6.2) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW /// A container type with user-defined contents and storage chunks. /// Useful for testing. @available(SwiftStdlib 5.0, *) diff --git a/Xcode/Collections.xcodeproj/project.pbxproj b/Xcode/Collections.xcodeproj/project.pbxproj index b9bceb2a..a538e15e 100644 --- a/Xcode/Collections.xcodeproj/project.pbxproj +++ b/Xcode/Collections.xcodeproj/project.pbxproj @@ -153,6 +153,8 @@ 7D72468E2F3D9DDB00112FD0 /* _HTable+Bitmap.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7D72467B2F3D9DDB00112FD0 /* _HTable+Bitmap.swift */; }; 7D7246902F3D9DDB00112FD0 /* _HTable+Sizing.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7D72467D2F3D9DDB00112FD0 /* _HTable+Sizing.swift */; }; 7D7246922F3D9E6800112FD0 /* RigidSetTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7D7246912F3D9E6800112FD0 /* RigidSetTests.swift */; }; + 7D72F5952F75DA62004AB792 /* BorrowingSequence+SpanIterator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7D72F5942F75DA62004AB792 /* BorrowingSequence+SpanIterator.swift */; }; + 7D72F5962F75DA62004AB792 /* BorrowingSequence+Algorithms.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7D72F5932F75DA62004AB792 /* BorrowingSequence+Algorithms.swift */; }; 7D9748D42E9748930098631A /* BigString+Chunk+UTF16.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7D9748D32E9748930098631A /* BigString+Chunk+UTF16.swift */; }; 7D9748D52E9748930098631A /* BigString+Chunk+UnicodeScalar.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7D9748D12E9748930098631A /* BigString+Chunk+UnicodeScalar.swift */; }; 7D9748D62E9748930098631A /* BigString+Chunk+Character.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7D9748CF2E9748930098631A /* BigString+Chunk+Character.swift */; }; @@ -749,6 +751,8 @@ 7D7246832F3D9DDB00112FD0 /* RigidDictionary.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RigidDictionary.swift; sourceTree = ""; }; 7D7246852F3D9DDB00112FD0 /* RigidSet.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RigidSet.swift; sourceTree = ""; }; 7D7246912F3D9E6800112FD0 /* RigidSetTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RigidSetTests.swift; sourceTree = ""; }; + 7D72F5932F75DA62004AB792 /* BorrowingSequence+Algorithms.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "BorrowingSequence+Algorithms.swift"; sourceTree = ""; }; + 7D72F5942F75DA62004AB792 /* BorrowingSequence+SpanIterator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "BorrowingSequence+SpanIterator.swift"; sourceTree = ""; }; 7D9748CF2E9748930098631A /* BigString+Chunk+Character.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "BigString+Chunk+Character.swift"; sourceTree = ""; }; 7D9748D02E9748930098631A /* BigString+Chunk+Index.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "BigString+Chunk+Index.swift"; sourceTree = ""; }; 7D9748D12E9748930098631A /* BigString+Chunk+UnicodeScalar.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "BigString+Chunk+UnicodeScalar.swift"; sourceTree = ""; }; @@ -1255,6 +1259,8 @@ 7D57EDC32F647DB10029D5E3 /* BorrowingIteratorProtocol+Reduce.swift */, 7D57EDC42F647DB10029D5E3 /* BorrowingIteratorProtocol+SpanwiseZip.swift */, 7D2A772B2F27F1E4005780C7 /* BorrowingSequence.swift */, + 7D72F5932F75DA62004AB792 /* BorrowingSequence+Algorithms.swift */, + 7D72F5942F75DA62004AB792 /* BorrowingSequence+SpanIterator.swift */, 7D2A772C2F27F1E4005780C7 /* BorrowingSequence+Standard Conformances.swift */, 7D2A772D2F27F1E4005780C7 /* BorrowingSequence+Utilities.swift */, 7D57EDCE2F647DB10029D5E3 /* Container */, @@ -2982,6 +2988,8 @@ 7DE9217129CA70F4004483EB /* TreeDictionary+Values.swift in Sources */, 7D2A77262F27F1D1005780C7 /* Span+Extras.swift in Sources */, 7DE920D029CA70F4004483EB /* BitSet+SetAlgebra isSubset.swift in Sources */, + 7D72F5952F75DA62004AB792 /* BorrowingSequence+SpanIterator.swift in Sources */, + 7D72F5962F75DA62004AB792 /* BorrowingSequence+Algorithms.swift in Sources */, 7D479CD92F47CBBA00A8CB59 /* RigidDictionary+Initializers.swift in Sources */, 7DE920C829CA70F4004483EB /* BitSet+SetAlgebra isEqualSet.swift in Sources */, 7DE9215B29CA70F4004483EB /* _HashNode+Structural mapValues.swift in Sources */,