diff --git a/Package.swift b/Package.swift index f15ad23d..9652e4ab 100644 --- a/Package.swift +++ b/Package.swift @@ -52,16 +52,6 @@ let _traits: Set = [ // // swift build -Xswiftc -DCOLLECTIONS_INTERNAL_CHECKS var defines: [SwiftSetting] = [ - .define( - "COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW", - .when(traits: ["UnstableContainersPreview"])), - .define( - "COLLECTIONS_UNSTABLE_SORTED_COLLECTIONS", - .when(traits: ["UnstableSortedCollections"])), - .define( - "COLLECTIONS_UNSTABLE_HASHED_CONTAINERS", - .when(traits: ["UnstableHashedContainers"])), - // Enables internal consistency checks at the end of initializers and // mutating operations. This can have very significant overhead, so enabling // this setting invalidates all documented performance guarantees. diff --git a/Sources/BasicContainers/RigidArray/RigidArray+Append.swift b/Sources/BasicContainers/RigidArray/RigidArray+Append.swift index 2710b252..c1b4445d 100644 --- a/Sources/BasicContainers/RigidArray/RigidArray+Append.swift +++ b/Sources/BasicContainers/RigidArray/RigidArray+Append.swift @@ -115,7 +115,7 @@ extension RigidArray where Element: ~Copyable { _count &+= items.count } -#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if UnstableContainersPreview /// Moves the elements of a input span to the end of this array, leaving the /// span empty. /// @@ -183,7 +183,7 @@ extension RigidArray where Element: ~Copyable { @available(SwiftStdlib 5.0, *) extension RigidArray where Element: ~Copyable { -#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if UnstableContainersPreview /// Appends the elements of a given container to the end of this array by /// consuming the source container. /// @@ -207,7 +207,7 @@ extension RigidArray where Element: ~Copyable { @available(SwiftStdlib 5.0, *) extension RigidArray where Element: ~Copyable { -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && UnstableContainersPreview /// Appends at most `newItemCount` items generated by a producer to the end of /// this array. /// @@ -245,7 +245,7 @@ extension RigidArray where Element: ~Copyable { } #endif -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && UnstableContainersPreview /// 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 @@ -346,7 +346,7 @@ extension RigidArray { return it } -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && UnstableContainersPreview @inlinable internal mutating func _append< Source: BorrowingSequence_ & ~Copyable & ~Escapable @@ -358,7 +358,7 @@ extension RigidArray { } #endif -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && UnstableContainersPreview /// 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 @@ -400,7 +400,7 @@ extension RigidArray { precondition(it.next() == nil, "RigidArray capacity overflow") } -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && UnstableContainersPreview /// 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 338804ff..fecf481b 100644 --- a/Sources/BasicContainers/RigidArray/RigidArray+Consumption.swift +++ b/Sources/BasicContainers/RigidArray/RigidArray+Consumption.swift @@ -18,7 +18,7 @@ import ContainersPreview #if compiler(>=6.2) -#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if UnstableContainersPreview @available(SwiftStdlib 5.0, *) extension RigidArray where Element: ~Copyable { @_lifetime(&self) @@ -137,7 +137,7 @@ extension RigidArray where Element: ~Copyable { } #endif -#if compiler(>=6.3) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.3) && UnstableContainersPreview @available(SwiftStdlib 5.0, *) extension RigidArray where Element: ~Copyable { @_alwaysEmitIntoClient @@ -188,7 +188,7 @@ extension RigidArray where Element: ~Copyable { } -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && UnstableContainersPreview @available(SwiftStdlib 5.0, *) extension RigidArray.SubrangeConsumer: Drain where Element: ~Copyable { } diff --git a/Sources/BasicContainers/RigidArray/RigidArray+Container.swift b/Sources/BasicContainers/RigidArray/RigidArray+Container.swift index 09475e65..0cbe300e 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 compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && UnstableContainersPreview @available(SwiftStdlib 5.0, *) extension RigidArray: BorrowingSequence_ where Element: ~Copyable { public typealias BorrowingIterator_ = SpanIterator @@ -30,7 +30,7 @@ extension RigidArray: BorrowingSequence_ where Element: ~Copyable { } #endif -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && UnstableContainersPreview @available(SwiftStdlib 5.0, *) extension RigidArray: Container where Element: ~Copyable {} diff --git a/Sources/BasicContainers/RigidArray/RigidArray+Equatable.swift b/Sources/BasicContainers/RigidArray/RigidArray+Equatable.swift index b0cc9316..e32a8c49 100644 --- a/Sources/BasicContainers/RigidArray/RigidArray+Equatable.swift +++ b/Sources/BasicContainers/RigidArray/RigidArray+Equatable.swift @@ -25,7 +25,7 @@ extension RigidArray where Element: ~Copyable { } } -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && UnstableContainersPreview @available(SwiftStdlib 5.0, *) extension RigidArray: Equatable where Element: Equatable & ~Copyable { @inlinable diff --git a/Sources/BasicContainers/RigidArray/RigidArray+Experimental.swift b/Sources/BasicContainers/RigidArray/RigidArray+Experimental.swift index 0b4f18fb..f121b0b9 100644 --- a/Sources/BasicContainers/RigidArray/RigidArray+Experimental.swift +++ b/Sources/BasicContainers/RigidArray/RigidArray+Experimental.swift @@ -16,7 +16,7 @@ import InternalCollectionsUtilities import ContainersPreview #endif -#if compiler(>=6.2) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.2) && UnstableContainersPreview #if false // FIXME @available(SwiftStdlib 5.0, *) diff --git a/Sources/BasicContainers/RigidArray/RigidArray+Initializers.swift b/Sources/BasicContainers/RigidArray/RigidArray+Initializers.swift index fd4a34eb..b90db7b6 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 compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && UnstableContainersPreview /// 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 compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && UnstableContainersPreview /// 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 0b9603d2..99124370 100644 --- a/Sources/BasicContainers/RigidArray/RigidArray+Insertions.swift +++ b/Sources/BasicContainers/RigidArray/RigidArray+Insertions.swift @@ -148,7 +148,7 @@ extension RigidArray where Element: ~Copyable { } } -#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if UnstableContainersPreview /// Moves the elements of an input span into this array, /// starting at the specified position, and leaving the span empty. /// @@ -238,7 +238,7 @@ extension RigidArray where Element: ~Copyable { @available(SwiftStdlib 5.0, *) extension RigidArray where Element: ~Copyable { -#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if UnstableContainersPreview /// Inserts the elements of a given array into the given position in this /// array by consuming the source container. /// @@ -268,7 +268,7 @@ extension RigidArray where Element: ~Copyable { @available(SwiftStdlib 5.0, *) extension RigidArray where Element: ~Copyable { -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && UnstableContainersPreview /// Inserts at most `newItemCount` items generated by a producer into this /// array, starting at the given index. /// @@ -406,7 +406,7 @@ extension RigidArray { } } -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && UnstableContainersPreview @_alwaysEmitIntoClient internal mutating func _insertContainer< C: Container & ~Copyable & ~Escapable @@ -453,7 +453,7 @@ extension RigidArray { _count += newCount } -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && UnstableContainersPreview /// Copies the elements of a container into this array at the specified /// position. /// @@ -513,7 +513,7 @@ extension RigidArray { at: index, copying: newElements, newCount: newElements.count) } -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && UnstableContainersPreview /// 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 9ebda4e0..2547d767 100644 --- a/Sources/BasicContainers/RigidArray/RigidArray+Replacements.swift +++ b/Sources/BasicContainers/RigidArray/RigidArray+Replacements.swift @@ -103,7 +103,7 @@ extension RigidArray where Element: ~Copyable { @available(SwiftStdlib 5.0, *) extension RigidArray where Element: ~Copyable { -#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if UnstableContainersPreview /// Replaces the specified range of elements by a given count of new items, /// using callbacks to consume old items, and to then insert new ones. /// @@ -247,7 +247,7 @@ extension RigidArray where Element: ~Copyable { } } -#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if UnstableContainersPreview /// Replaces the specified range of elements by moving the contents of an /// input span into their place. On return, the span is left empty. /// @@ -369,7 +369,7 @@ extension RigidArray where Element: ~Copyable { @available(SwiftStdlib 5.0, *) extension RigidArray where Element: ~Copyable { -#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if UnstableContainersPreview /// Replaces the specified range of elements by moving the elements of a /// given array into their place, consuming it in the process. /// @@ -409,7 +409,7 @@ extension RigidArray where Element: ~Copyable { @available(SwiftStdlib 5.0, *) extension RigidArray where Element: ~Copyable { -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && UnstableContainersPreview /// Replaces the specified range of elements by at most `newItemCount` items /// generated by a producer. /// @@ -582,7 +582,7 @@ extension RigidArray { } } -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && UnstableContainersPreview @inlinable internal mutating func _replace< C: Container & ~Copyable & ~Escapable @@ -634,7 +634,7 @@ extension RigidArray { } -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && UnstableContainersPreview /// Replaces the specified subrange of elements by copying the elements of /// the given container. /// @@ -714,7 +714,7 @@ extension RigidArray { newCount: newElements.count) } -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && UnstableContainersPreview /// Replaces the specified subrange of elements by copying the elements of /// the given container. /// diff --git a/Sources/BasicContainers/RigidDictionary/RigidDictionary+Consumption.swift b/Sources/BasicContainers/RigidDictionary/RigidDictionary+Consumption.swift index 50e5651d..f059de0f 100644 --- a/Sources/BasicContainers/RigidDictionary/RigidDictionary+Consumption.swift +++ b/Sources/BasicContainers/RigidDictionary/RigidDictionary+Consumption.swift @@ -15,11 +15,11 @@ import ContainersPreview #endif -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_HASHED_CONTAINERS +#if compiler(>=6.4) && UnstableHashedContainers @available(SwiftStdlib 5.0, *) extension RigidDictionary where Key: ~Copyable, Value: ~Copyable { -#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if UnstableContainersPreview @inlinable public mutating func consumeAll( consumingWith consumer: ( diff --git a/Sources/BasicContainers/RigidDictionary/RigidDictionary+Debugging.swift b/Sources/BasicContainers/RigidDictionary/RigidDictionary+Debugging.swift index 35a2af2a..6d96645b 100644 --- a/Sources/BasicContainers/RigidDictionary/RigidDictionary+Debugging.swift +++ b/Sources/BasicContainers/RigidDictionary/RigidDictionary+Debugging.swift @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_HASHED_CONTAINERS +#if compiler(>=6.4) && UnstableHashedContainers @available(SwiftStdlib 5.0, *) extension RigidDictionary where Key: ~Copyable, Value: ~Copyable { diff --git a/Sources/BasicContainers/RigidDictionary/RigidDictionary+Equatable.swift b/Sources/BasicContainers/RigidDictionary/RigidDictionary+Equatable.swift index e12f3f0b..23b8383a 100644 --- a/Sources/BasicContainers/RigidDictionary/RigidDictionary+Equatable.swift +++ b/Sources/BasicContainers/RigidDictionary/RigidDictionary+Equatable.swift @@ -17,7 +17,7 @@ import ContainersPreview #endif -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_HASHED_CONTAINERS +#if compiler(>=6.4) && UnstableHashedContainers @available(SwiftStdlib 5.0, *) extension RigidDictionary { diff --git a/Sources/BasicContainers/RigidDictionary/RigidDictionary+Hashable.swift b/Sources/BasicContainers/RigidDictionary/RigidDictionary+Hashable.swift index 33d0940e..398785cd 100644 --- a/Sources/BasicContainers/RigidDictionary/RigidDictionary+Hashable.swift +++ b/Sources/BasicContainers/RigidDictionary/RigidDictionary+Hashable.swift @@ -16,7 +16,7 @@ import InternalCollectionsUtilities import ContainersPreview #endif -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_HASHED_CONTAINERS +#if compiler(>=6.4) && UnstableHashedContainers @available(SwiftStdlib 5.0, *) extension RigidDictionary: Hashable where Value: Hashable { // Should be Hashable diff --git a/Sources/BasicContainers/RigidDictionary/RigidDictionary+Index.swift b/Sources/BasicContainers/RigidDictionary/RigidDictionary+Index.swift index 3fc6784b..8f417485 100644 --- a/Sources/BasicContainers/RigidDictionary/RigidDictionary+Index.swift +++ b/Sources/BasicContainers/RigidDictionary/RigidDictionary+Index.swift @@ -15,7 +15,7 @@ import ContainersPreview #endif -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_HASHED_CONTAINERS +#if compiler(>=6.4) && UnstableHashedContainers @available(SwiftStdlib 5.0, *) extension RigidDictionary where Key: ~Copyable, Value: ~Copyable { diff --git a/Sources/BasicContainers/RigidDictionary/RigidDictionary+Indices.swift b/Sources/BasicContainers/RigidDictionary/RigidDictionary+Indices.swift index fcb331eb..804c15e0 100644 --- a/Sources/BasicContainers/RigidDictionary/RigidDictionary+Indices.swift +++ b/Sources/BasicContainers/RigidDictionary/RigidDictionary+Indices.swift @@ -15,7 +15,7 @@ import ContainersPreview #endif -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_HASHED_CONTAINERS && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && UnstableHashedContainers && UnstableContainersPreview @available(SwiftStdlib 6.2, *) extension RigidDictionary where Key: ~Copyable, Value: ~Copyable { diff --git a/Sources/BasicContainers/RigidDictionary/RigidDictionary+Initializers.swift b/Sources/BasicContainers/RigidDictionary/RigidDictionary+Initializers.swift index 2ef8d9fc..0dd1ad4a 100644 --- a/Sources/BasicContainers/RigidDictionary/RigidDictionary+Initializers.swift +++ b/Sources/BasicContainers/RigidDictionary/RigidDictionary+Initializers.swift @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_HASHED_CONTAINERS +#if compiler(>=6.4) && UnstableHashedContainers @available(SwiftStdlib 5.0, *) extension RigidDictionary where Key: ~Copyable, Value: ~Copyable { diff --git a/Sources/BasicContainers/RigidDictionary/RigidDictionary+Insertions.swift b/Sources/BasicContainers/RigidDictionary/RigidDictionary+Insertions.swift index 2a7021f3..799672fa 100644 --- a/Sources/BasicContainers/RigidDictionary/RigidDictionary+Insertions.swift +++ b/Sources/BasicContainers/RigidDictionary/RigidDictionary+Insertions.swift @@ -15,7 +15,7 @@ import ContainersPreview #endif -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_HASHED_CONTAINERS +#if compiler(>=6.4) && UnstableHashedContainers @available(SwiftStdlib 5.0, *) extension RigidDictionary where Key: ~Copyable, Value: ~Copyable { @@ -96,7 +96,7 @@ extension RigidDictionary where Key: ~Copyable, Value: ~Copyable { return nil } -#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if UnstableContainersPreview @inlinable @discardableResult @_lifetime(&self) diff --git a/Sources/BasicContainers/RigidDictionary/RigidDictionary+Keys.swift b/Sources/BasicContainers/RigidDictionary/RigidDictionary+Keys.swift index ca0b1efe..49d5e1ce 100644 --- a/Sources/BasicContainers/RigidDictionary/RigidDictionary+Keys.swift +++ b/Sources/BasicContainers/RigidDictionary/RigidDictionary+Keys.swift @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_HASHED_CONTAINERS +#if compiler(>=6.4) && UnstableHashedContainers @available(SwiftStdlib 5.0, *) extension RigidDictionary where Key: ~Copyable, Value: ~Copyable { diff --git a/Sources/BasicContainers/RigidDictionary/RigidDictionary+Lookup.swift b/Sources/BasicContainers/RigidDictionary/RigidDictionary+Lookup.swift index 3f4365c5..e65b424d 100644 --- a/Sources/BasicContainers/RigidDictionary/RigidDictionary+Lookup.swift +++ b/Sources/BasicContainers/RigidDictionary/RigidDictionary+Lookup.swift @@ -15,7 +15,7 @@ import ContainersPreview #endif -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_HASHED_CONTAINERS +#if compiler(>=6.4) && UnstableHashedContainers @available(SwiftStdlib 5.0, *) extension RigidDictionary where Key: ~Copyable, Value: ~Copyable { @@ -32,7 +32,7 @@ extension RigidDictionary where Key: ~Copyable, Value: ~Copyable { _find(key).bucket != nil } -#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if UnstableContainersPreview @inlinable @_lifetime(borrow self) public func value( @@ -56,7 +56,7 @@ extension RigidDictionary where Key: ~Copyable, Value: ~Copyable { return try body(_valueBuf[bucket]) } -#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if UnstableContainersPreview @_alwaysEmitIntoClient @_lifetime(borrow self) package func _borrowKey(at bucket: _Bucket) -> Borrow { diff --git a/Sources/BasicContainers/RigidDictionary/RigidDictionary+Removals.swift b/Sources/BasicContainers/RigidDictionary/RigidDictionary+Removals.swift index 3dccbcd5..d4034eec 100644 --- a/Sources/BasicContainers/RigidDictionary/RigidDictionary+Removals.swift +++ b/Sources/BasicContainers/RigidDictionary/RigidDictionary+Removals.swift @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_HASHED_CONTAINERS +#if compiler(>=6.4) && UnstableHashedContainers @available(SwiftStdlib 5.0, *) extension RigidDictionary where Key: ~Copyable, Value: ~Copyable { diff --git a/Sources/BasicContainers/RigidDictionary/RigidDictionary+Resizing.swift b/Sources/BasicContainers/RigidDictionary/RigidDictionary+Resizing.swift index 43bbc9f7..7175bec3 100644 --- a/Sources/BasicContainers/RigidDictionary/RigidDictionary+Resizing.swift +++ b/Sources/BasicContainers/RigidDictionary/RigidDictionary+Resizing.swift @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_HASHED_CONTAINERS +#if compiler(>=6.4) && UnstableHashedContainers @available(SwiftStdlib 5.0, *) extension RigidDictionary where Key: ~Copyable, Value: ~Copyable { diff --git a/Sources/BasicContainers/RigidDictionary/RigidDictionary.swift b/Sources/BasicContainers/RigidDictionary/RigidDictionary.swift index 28285f80..55eeb7c0 100644 --- a/Sources/BasicContainers/RigidDictionary/RigidDictionary.swift +++ b/Sources/BasicContainers/RigidDictionary/RigidDictionary.swift @@ -16,7 +16,7 @@ import InternalCollectionsUtilities import ContainersPreview #endif -#if COLLECTIONS_UNSTABLE_HASHED_CONTAINERS +#if UnstableHashedContainers #if compiler(<6.4) @available(*, unavailable, message: "RigidDictionary requires a Swift 6.4 toolchain") @frozen diff --git a/Sources/BasicContainers/RigidSet/RigidSet+BorrowingSequence.swift b/Sources/BasicContainers/RigidSet/RigidSet+BorrowingSequence.swift index 6c9aba63..a1675ba2 100644 --- a/Sources/BasicContainers/RigidSet/RigidSet+BorrowingSequence.swift +++ b/Sources/BasicContainers/RigidSet/RigidSet+BorrowingSequence.swift @@ -15,7 +15,7 @@ import ContainersPreview #endif -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_HASHED_CONTAINERS && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && UnstableHashedContainers && UnstableContainersPreview @available(SwiftStdlib 5.0, *) extension RigidSet: BorrowingSequence_ where Element: ~Copyable { diff --git a/Sources/BasicContainers/RigidSet/RigidSet+Consumption.swift b/Sources/BasicContainers/RigidSet/RigidSet+Consumption.swift index 6457fdf0..87939bb9 100644 --- a/Sources/BasicContainers/RigidSet/RigidSet+Consumption.swift +++ b/Sources/BasicContainers/RigidSet/RigidSet+Consumption.swift @@ -15,11 +15,11 @@ import ContainersPreview #endif -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_HASHED_CONTAINERS +#if compiler(>=6.4) && UnstableHashedContainers @available(SwiftStdlib 5.0, *) extension RigidSet where Element: ~Copyable { -#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if UnstableContainersPreview @inlinable public mutating func consumeAll( consumingWith consumer: (inout InputSpan) -> Void diff --git a/Sources/BasicContainers/RigidSet/RigidSet+Debugging.swift b/Sources/BasicContainers/RigidSet/RigidSet+Debugging.swift index 936a8ba3..bd561f84 100644 --- a/Sources/BasicContainers/RigidSet/RigidSet+Debugging.swift +++ b/Sources/BasicContainers/RigidSet/RigidSet+Debugging.swift @@ -15,7 +15,7 @@ import InternalCollectionsUtilities #endif -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_HASHED_CONTAINERS +#if compiler(>=6.4) && UnstableHashedContainers @available(SwiftStdlib 5.0, *) extension RigidSet where Element: ~Copyable { diff --git a/Sources/BasicContainers/RigidSet/RigidSet+Equatable.swift b/Sources/BasicContainers/RigidSet/RigidSet+Equatable.swift index c0dbcc21..6c8e7957 100644 --- a/Sources/BasicContainers/RigidSet/RigidSet+Equatable.swift +++ b/Sources/BasicContainers/RigidSet/RigidSet+Equatable.swift @@ -17,7 +17,7 @@ import ContainersPreview #endif -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_HASHED_CONTAINERS +#if compiler(>=6.4) && UnstableHashedContainers @available(SwiftStdlib 5.0, *) extension RigidSet { @@ -28,7 +28,7 @@ extension RigidSet { } } -#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if UnstableContainersPreview @available(SwiftStdlib 6.4, *) extension RigidSet: Equatable {} diff --git a/Sources/BasicContainers/RigidSet/RigidSet+Hashable.swift b/Sources/BasicContainers/RigidSet/RigidSet+Hashable.swift index e8be89f1..3e2ff619 100644 --- a/Sources/BasicContainers/RigidSet/RigidSet+Hashable.swift +++ b/Sources/BasicContainers/RigidSet/RigidSet+Hashable.swift @@ -16,7 +16,7 @@ import InternalCollectionsUtilities import ContainersPreview #endif -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_HASHED_CONTAINERS && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && UnstableHashedContainers && UnstableContainersPreview @available(SwiftStdlib 6.4, *) extension RigidSet: Hashable {} @@ -35,7 +35,7 @@ extension RigidSet { @inlinable public func _rawHashValue(seed: Int) -> Int { -#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if UnstableContainersPreview var hash = 0 var it = self.makeBorrowingIterator_() while true { diff --git a/Sources/BasicContainers/RigidSet/RigidSet+Index.swift b/Sources/BasicContainers/RigidSet/RigidSet+Index.swift index ee1989b9..5fe511f1 100644 --- a/Sources/BasicContainers/RigidSet/RigidSet+Index.swift +++ b/Sources/BasicContainers/RigidSet/RigidSet+Index.swift @@ -15,7 +15,7 @@ import ContainersPreview #endif -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_HASHED_CONTAINERS +#if compiler(>=6.4) && UnstableHashedContainers @available(SwiftStdlib 5.0, *) extension RigidSet where Element: ~Copyable { diff --git a/Sources/BasicContainers/RigidSet/RigidSet+Initializers.swift b/Sources/BasicContainers/RigidSet/RigidSet+Initializers.swift index fc2f1ddb..578acc38 100644 --- a/Sources/BasicContainers/RigidSet/RigidSet+Initializers.swift +++ b/Sources/BasicContainers/RigidSet/RigidSet+Initializers.swift @@ -15,7 +15,7 @@ import ContainersPreview #endif -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_HASHED_CONTAINERS +#if compiler(>=6.4) && UnstableHashedContainers @available(SwiftStdlib 5.0, *) extension RigidSet where Element: ~Copyable { @@ -49,7 +49,7 @@ extension RigidSet where Element: ~Copyable { try self.insert(maximumCount: capacity, initializingWith: initializer) } -#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if UnstableContainersPreview @_alwaysEmitIntoClient public init< E: Error, @@ -65,7 +65,7 @@ extension RigidSet where Element: ~Copyable { } #endif -#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if UnstableContainersPreview @_alwaysEmitIntoClient public init< D: Drain & ~Copyable & ~Escapable @@ -81,7 +81,7 @@ extension RigidSet where Element: ~Copyable { @available(SwiftStdlib 5.0, *) extension RigidSet /* where Element: Copyable */ { -#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if UnstableContainersPreview @_alwaysEmitIntoClient @inline(__always) public init< @@ -115,7 +115,7 @@ extension RigidSet /* where Element: Copyable */ { self.insert(copying: contents) } -#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if UnstableContainersPreview @_alwaysEmitIntoClient @inline(__always) public init< diff --git a/Sources/BasicContainers/RigidSet/RigidSet+Insertions.swift b/Sources/BasicContainers/RigidSet/RigidSet+Insertions.swift index e7aea1df..35e6c629 100644 --- a/Sources/BasicContainers/RigidSet/RigidSet+Insertions.swift +++ b/Sources/BasicContainers/RigidSet/RigidSet+Insertions.swift @@ -15,7 +15,7 @@ import ContainersPreview #endif -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_HASHED_CONTAINERS +#if compiler(>=6.4) && UnstableHashedContainers @available(SwiftStdlib 5.0, *) extension RigidSet where Element: ~Copyable { @@ -140,7 +140,7 @@ extension RigidSet where Element: ~Copyable { capacity: c ) { output throws(E) in defer { - #if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW + #if UnstableContainersPreview output._consumeAll { span in if span.count < c { remainder = 0 @@ -165,7 +165,7 @@ extension RigidSet where Element: ~Copyable { } } -#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if UnstableContainersPreview @_alwaysEmitIntoClient public mutating func insert< E: Error, @@ -186,7 +186,7 @@ extension RigidSet where Element: ~Copyable { } #endif -#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if UnstableContainersPreview @_alwaysEmitIntoClient public mutating func insert< D: Drain & ~Copyable & ~Escapable @@ -220,7 +220,7 @@ extension RigidSet /* where Element: Copyable */ { } } -#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if UnstableContainersPreview @_alwaysEmitIntoClient package mutating func _insert< S: BorrowingSequence_ & ~Copyable & ~Escapable @@ -236,7 +236,7 @@ extension RigidSet /* where Element: Copyable */ { } #endif -#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if UnstableContainersPreview @_alwaysEmitIntoClient @inline(__always) public mutating func insert< @@ -257,7 +257,7 @@ extension RigidSet /* where Element: Copyable */ { } } -#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if UnstableContainersPreview @_alwaysEmitIntoClient @inline(__always) public mutating func insert< diff --git a/Sources/BasicContainers/RigidSet/RigidSet+Lookup.swift b/Sources/BasicContainers/RigidSet/RigidSet+Lookup.swift index 3013843e..f240ad33 100644 --- a/Sources/BasicContainers/RigidSet/RigidSet+Lookup.swift +++ b/Sources/BasicContainers/RigidSet/RigidSet+Lookup.swift @@ -15,7 +15,7 @@ import ContainersPreview #endif -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_HASHED_CONTAINERS +#if compiler(>=6.4) && UnstableHashedContainers @available(SwiftStdlib 5.0, *) extension RigidSet where Element: ~Copyable { @@ -40,7 +40,7 @@ extension RigidSet where Element: ~Copyable { _find(item).bucket != nil } -#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if UnstableContainersPreview @_alwaysEmitIntoClient @_lifetime(borrow self) package func _borrowValue(at bucket: _Bucket) -> Borrow { diff --git a/Sources/BasicContainers/RigidSet/RigidSet+Removals.swift b/Sources/BasicContainers/RigidSet/RigidSet+Removals.swift index 776c84a4..8d5b3dbd 100644 --- a/Sources/BasicContainers/RigidSet/RigidSet+Removals.swift +++ b/Sources/BasicContainers/RigidSet/RigidSet+Removals.swift @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_HASHED_CONTAINERS +#if compiler(>=6.4) && UnstableHashedContainers @available(SwiftStdlib 5.0, *) extension RigidSet where Element: ~Copyable { diff --git a/Sources/BasicContainers/RigidSet/RigidSet+Resizing.swift b/Sources/BasicContainers/RigidSet/RigidSet+Resizing.swift index 433cc2f4..91d4e0a4 100644 --- a/Sources/BasicContainers/RigidSet/RigidSet+Resizing.swift +++ b/Sources/BasicContainers/RigidSet/RigidSet+Resizing.swift @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_HASHED_CONTAINERS +#if compiler(>=6.4) && UnstableHashedContainers @available(SwiftStdlib 5.0, *) extension RigidSet where Element: ~Copyable { diff --git a/Sources/BasicContainers/RigidSet/RigidSet.swift b/Sources/BasicContainers/RigidSet/RigidSet.swift index 082d535a..ba563555 100644 --- a/Sources/BasicContainers/RigidSet/RigidSet.swift +++ b/Sources/BasicContainers/RigidSet/RigidSet.swift @@ -16,7 +16,7 @@ import InternalCollectionsUtilities import ContainersPreview #endif -#if COLLECTIONS_UNSTABLE_HASHED_CONTAINERS +#if UnstableHashedContainers #if compiler(<6.4) /// A fixed-capacity, noncopyable, unordered hashed container of unique /// elements. diff --git a/Sources/BasicContainers/UniqueArray/UniqueArray+Append.swift b/Sources/BasicContainers/UniqueArray/UniqueArray+Append.swift index d8631612..7f2ace56 100644 --- a/Sources/BasicContainers/UniqueArray/UniqueArray+Append.swift +++ b/Sources/BasicContainers/UniqueArray/UniqueArray+Append.swift @@ -92,7 +92,7 @@ extension UniqueArray where Element: ~Copyable { _storage.append(moving: items) } -#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if UnstableContainersPreview /// Moves the elements of a input span to the end of this array, leaving the /// span empty. /// @@ -157,7 +157,7 @@ extension UniqueArray where Element: ~Copyable { @available(SwiftStdlib 5.0, *) extension UniqueArray where Element: ~Copyable { -#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if UnstableContainersPreview /// Appends the elements of a given container to the end of this array by /// consuming the source container. /// @@ -179,7 +179,7 @@ extension UniqueArray where Element: ~Copyable { } #endif -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && UnstableContainersPreview /// Appends at most `newItemCount` items generated by a producer to the end of /// this array. /// @@ -214,7 +214,7 @@ extension UniqueArray where Element: ~Copyable { } #endif -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && UnstableContainersPreview /// 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 @@ -307,7 +307,7 @@ extension UniqueArray { _storage.append(copying: newElements) } -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && UnstableContainersPreview @inlinable internal mutating func _append< Source: BorrowingSequence_ & ~Copyable & ~Escapable @@ -326,7 +326,7 @@ extension UniqueArray { // FIXME: Add _append(copyingContainer:), forwarding to the same method on RigidArray #endif -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && UnstableContainersPreview /// 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, @@ -382,7 +382,7 @@ extension UniqueArray { } } -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && UnstableContainersPreview /// 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+Consumption.swift b/Sources/BasicContainers/UniqueArray/UniqueArray+Consumption.swift index f8aaaf3b..5c1dbf6a 100644 --- a/Sources/BasicContainers/UniqueArray/UniqueArray+Consumption.swift +++ b/Sources/BasicContainers/UniqueArray/UniqueArray+Consumption.swift @@ -18,7 +18,7 @@ import ContainersPreview #if compiler(>=6.2) -#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if UnstableContainersPreview @available(SwiftStdlib 5.0, *) extension UniqueArray where Element: ~Copyable { @_lifetime(&self) @@ -116,7 +116,7 @@ extension UniqueArray where Element: ~Copyable { } #endif -#if compiler(>=6.3) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.3) && UnstableContainersPreview @available(SwiftStdlib 5.0, *) extension UniqueArray where Element: ~Copyable { public typealias SubrangeConsumer = RigidArray.SubrangeConsumer diff --git a/Sources/BasicContainers/UniqueArray/UniqueArray+Container.swift b/Sources/BasicContainers/UniqueArray/UniqueArray+Container.swift index c7b5742a..cdd6b0b8 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 compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && UnstableContainersPreview @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 compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && UnstableContainersPreview @available(SwiftStdlib 5.0, *) extension UniqueArray: Container where Element: ~Copyable {} diff --git a/Sources/BasicContainers/UniqueArray/UniqueArray+Equatable.swift b/Sources/BasicContainers/UniqueArray/UniqueArray+Equatable.swift index 722c1418..a87f386d 100644 --- a/Sources/BasicContainers/UniqueArray/UniqueArray+Equatable.swift +++ b/Sources/BasicContainers/UniqueArray/UniqueArray+Equatable.swift @@ -24,7 +24,7 @@ extension UniqueArray where Element: ~Copyable { } } -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && UnstableContainersPreview @available(SwiftStdlib 5.0, *) extension UniqueArray: Equatable where Element: Equatable & ~Copyable { @inlinable diff --git a/Sources/BasicContainers/UniqueArray/UniqueArray+Experimental.swift b/Sources/BasicContainers/UniqueArray/UniqueArray+Experimental.swift index 9168ba3b..1c0c71e5 100644 --- a/Sources/BasicContainers/UniqueArray/UniqueArray+Experimental.swift +++ b/Sources/BasicContainers/UniqueArray/UniqueArray+Experimental.swift @@ -17,7 +17,7 @@ import InternalCollectionsUtilities import ContainersPreview #endif -#if compiler(>=6.2) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.2) && UnstableContainersPreview #if false // TODO extension UniqueArray /*where Element: Copyable*/ { diff --git a/Sources/BasicContainers/UniqueArray/UniqueArray+Initializers.swift b/Sources/BasicContainers/UniqueArray/UniqueArray+Initializers.swift index 478b1b6a..b21dd2ae 100644 --- a/Sources/BasicContainers/UniqueArray/UniqueArray+Initializers.swift +++ b/Sources/BasicContainers/UniqueArray/UniqueArray+Initializers.swift @@ -85,7 +85,7 @@ extension UniqueArray where Element: ~Copyable { @available(SwiftStdlib 5.0, *) extension UniqueArray /*where Element: Copyable*/ { -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && UnstableContainersPreview /// Creates a new array with the specified initial capacity, holding a copy /// of the contents of a given borrowing sequence. /// @@ -122,7 +122,7 @@ extension UniqueArray /*where Element: Copyable*/ { self.append(copying: contents) } -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && UnstableContainersPreview /// 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 7e8c2f7d..83d19688 100644 --- a/Sources/BasicContainers/UniqueArray/UniqueArray+Insertions.swift +++ b/Sources/BasicContainers/UniqueArray/UniqueArray+Insertions.swift @@ -121,7 +121,7 @@ extension UniqueArray where Element: ~Copyable { _storage.insert(moving: items, at: index) } -#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if UnstableContainersPreview /// Moves the elements of an input span into this array, /// starting at the specified position, and leaving the span empty. /// @@ -201,7 +201,7 @@ extension UniqueArray where Element: ~Copyable { @available(SwiftStdlib 5.0, *) extension UniqueArray where Element: ~Copyable { -#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if UnstableContainersPreview /// Inserts the elements of a given array into the given position in this /// array by consuming the source container. /// @@ -229,7 +229,7 @@ extension UniqueArray where Element: ~Copyable { @available(SwiftStdlib 5.0, *) extension UniqueArray where Element: ~Copyable { -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && UnstableContainersPreview /// Inserts at most `newItemCount` items generated by a producer into this /// array, starting at the given index. /// @@ -368,7 +368,7 @@ extension UniqueArray { _storage.insert(copying: newElements, at: index) } -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && UnstableContainersPreview /// Copies the elements of a container into this array at the specified /// position. /// @@ -435,7 +435,7 @@ extension UniqueArray { at: index, copying: newElements, newCount: newCount) } -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && UnstableContainersPreview /// 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 f963906e..2b6c91b5 100644 --- a/Sources/BasicContainers/UniqueArray/UniqueArray+Replacements.swift +++ b/Sources/BasicContainers/UniqueArray/UniqueArray+Replacements.swift @@ -80,7 +80,7 @@ extension UniqueArray where Element: ~Copyable { @available(SwiftStdlib 5.0, *) extension UniqueArray where Element: ~Copyable { -#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if UnstableContainersPreview /// Replaces the specified range of elements by a given count of new items, /// using callbacks to consume old items, and to then insert new ones. /// @@ -189,7 +189,7 @@ extension UniqueArray where Element: ~Copyable { _storage.replace(removing: subrange, moving: newElements) } -#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if UnstableContainersPreview /// Replaces the specified range of elements by moving the contents of an /// input span into their place. On return, the span is left empty. /// @@ -345,7 +345,7 @@ extension UniqueArray where Element: ~Copyable { @available(SwiftStdlib 5.0, *) extension UniqueArray where Element: ~Copyable { -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && UnstableContainersPreview /// Replaces the specified range of elements by at most `maximumCount` items /// generated by a producer. /// @@ -522,7 +522,7 @@ extension UniqueArray { _storage.replace(removing: subrange, copying: newElements) } -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && UnstableContainersPreview /// Replaces the specified subrange of elements by copying the elements of /// the given container. /// @@ -612,7 +612,7 @@ extension UniqueArray { newCount: c) } -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && UnstableContainersPreview /// Replaces the specified subrange of elements by copying the elements of /// the given container. /// diff --git a/Sources/BasicContainers/UniqueDictionary/UniqueDictionary+Consumption.swift b/Sources/BasicContainers/UniqueDictionary/UniqueDictionary+Consumption.swift index 07e887c3..b64c68b2 100644 --- a/Sources/BasicContainers/UniqueDictionary/UniqueDictionary+Consumption.swift +++ b/Sources/BasicContainers/UniqueDictionary/UniqueDictionary+Consumption.swift @@ -15,11 +15,11 @@ import ContainersPreview #endif -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_HASHED_CONTAINERS +#if compiler(>=6.4) && UnstableHashedContainers @available(SwiftStdlib 5.0, *) extension UniqueDictionary where Key: ~Copyable, Value: ~Copyable { -#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if UnstableContainersPreview @inlinable public mutating func consumeAll( consumingWith consumer: ( diff --git a/Sources/BasicContainers/UniqueDictionary/UniqueDictionary+Debugging.swift b/Sources/BasicContainers/UniqueDictionary/UniqueDictionary+Debugging.swift index 0bc2622f..e2a706e0 100644 --- a/Sources/BasicContainers/UniqueDictionary/UniqueDictionary+Debugging.swift +++ b/Sources/BasicContainers/UniqueDictionary/UniqueDictionary+Debugging.swift @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_HASHED_CONTAINERS +#if compiler(>=6.4) && UnstableHashedContainers @available(SwiftStdlib 5.0, *) extension UniqueDictionary where Key: ~Copyable, Value: ~Copyable { diff --git a/Sources/BasicContainers/UniqueDictionary/UniqueDictionary+Equatable.swift b/Sources/BasicContainers/UniqueDictionary/UniqueDictionary+Equatable.swift index 9db2f048..2294e565 100644 --- a/Sources/BasicContainers/UniqueDictionary/UniqueDictionary+Equatable.swift +++ b/Sources/BasicContainers/UniqueDictionary/UniqueDictionary+Equatable.swift @@ -17,7 +17,7 @@ import ContainersPreview #endif -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_HASHED_CONTAINERS +#if compiler(>=6.4) && UnstableHashedContainers @available(SwiftStdlib 5.0, *) extension UniqueDictionary { diff --git a/Sources/BasicContainers/UniqueDictionary/UniqueDictionary+Hashable.swift b/Sources/BasicContainers/UniqueDictionary/UniqueDictionary+Hashable.swift index 33d999d1..0c9db8cf 100644 --- a/Sources/BasicContainers/UniqueDictionary/UniqueDictionary+Hashable.swift +++ b/Sources/BasicContainers/UniqueDictionary/UniqueDictionary+Hashable.swift @@ -16,7 +16,7 @@ import InternalCollectionsUtilities import ContainersPreview #endif -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_HASHED_CONTAINERS +#if compiler(>=6.4) && UnstableHashedContainers @available(SwiftStdlib 5.0, *) extension UniqueDictionary: Hashable where Value: Hashable { diff --git a/Sources/BasicContainers/UniqueDictionary/UniqueDictionary+Index.swift b/Sources/BasicContainers/UniqueDictionary/UniqueDictionary+Index.swift index bbbf67b1..fded3eff 100644 --- a/Sources/BasicContainers/UniqueDictionary/UniqueDictionary+Index.swift +++ b/Sources/BasicContainers/UniqueDictionary/UniqueDictionary+Index.swift @@ -15,7 +15,7 @@ import ContainersPreview #endif -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_HASHED_CONTAINERS +#if compiler(>=6.4) && UnstableHashedContainers @available(SwiftStdlib 5.0, *) extension UniqueDictionary where Key: ~Copyable, Value: ~Copyable { diff --git a/Sources/BasicContainers/UniqueDictionary/UniqueDictionary+Indices.swift b/Sources/BasicContainers/UniqueDictionary/UniqueDictionary+Indices.swift index 4602fbec..05af329e 100644 --- a/Sources/BasicContainers/UniqueDictionary/UniqueDictionary+Indices.swift +++ b/Sources/BasicContainers/UniqueDictionary/UniqueDictionary+Indices.swift @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_HASHED_CONTAINERS && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && UnstableHashedContainers && UnstableContainersPreview @available(SwiftStdlib 6.2, *) extension UniqueDictionary where Key: ~Copyable, Value: ~Copyable { diff --git a/Sources/BasicContainers/UniqueDictionary/UniqueDictionary+Initializers.swift b/Sources/BasicContainers/UniqueDictionary/UniqueDictionary+Initializers.swift index 924d796c..3ee690ca 100644 --- a/Sources/BasicContainers/UniqueDictionary/UniqueDictionary+Initializers.swift +++ b/Sources/BasicContainers/UniqueDictionary/UniqueDictionary+Initializers.swift @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_HASHED_CONTAINERS +#if compiler(>=6.4) && UnstableHashedContainers @available(SwiftStdlib 5.0, *) extension UniqueDictionary where Key: ~Copyable, Value: ~Copyable { diff --git a/Sources/BasicContainers/UniqueDictionary/UniqueDictionary+Insertions.swift b/Sources/BasicContainers/UniqueDictionary/UniqueDictionary+Insertions.swift index f83c4396..bbc691f1 100644 --- a/Sources/BasicContainers/UniqueDictionary/UniqueDictionary+Insertions.swift +++ b/Sources/BasicContainers/UniqueDictionary/UniqueDictionary+Insertions.swift @@ -15,7 +15,7 @@ import ContainersPreview #endif -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_HASHED_CONTAINERS +#if compiler(>=6.4) && UnstableHashedContainers @available(SwiftStdlib 5.0, *) extension UniqueDictionary where Key: ~Copyable, Value: ~Copyable { @@ -53,7 +53,7 @@ extension UniqueDictionary where Key: ~Copyable, Value: ~Copyable { return nil } -#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if UnstableContainersPreview @inlinable @discardableResult @_lifetime(&self) diff --git a/Sources/BasicContainers/UniqueDictionary/UniqueDictionary+Keys.swift b/Sources/BasicContainers/UniqueDictionary/UniqueDictionary+Keys.swift index cfa0536d..b09a0c45 100644 --- a/Sources/BasicContainers/UniqueDictionary/UniqueDictionary+Keys.swift +++ b/Sources/BasicContainers/UniqueDictionary/UniqueDictionary+Keys.swift @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_HASHED_CONTAINERS +#if compiler(>=6.4) && UnstableHashedContainers @available(SwiftStdlib 5.0, *) extension UniqueDictionary where Key: ~Copyable, Value: ~Copyable { diff --git a/Sources/BasicContainers/UniqueDictionary/UniqueDictionary+Lookup.swift b/Sources/BasicContainers/UniqueDictionary/UniqueDictionary+Lookup.swift index 2d7799c5..bfdb387b 100644 --- a/Sources/BasicContainers/UniqueDictionary/UniqueDictionary+Lookup.swift +++ b/Sources/BasicContainers/UniqueDictionary/UniqueDictionary+Lookup.swift @@ -15,7 +15,7 @@ import ContainersPreview #endif -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_HASHED_CONTAINERS +#if compiler(>=6.4) && UnstableHashedContainers @available(SwiftStdlib 5.0, *) extension UniqueDictionary where Key: ~Copyable, Value: ~Copyable { @@ -24,7 +24,7 @@ extension UniqueDictionary where Key: ~Copyable, Value: ~Copyable { _storage.containsKey(key) } -#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if UnstableContainersPreview @inlinable @_lifetime(borrow self) public func value( diff --git a/Sources/BasicContainers/UniqueDictionary/UniqueDictionary+Removals.swift b/Sources/BasicContainers/UniqueDictionary/UniqueDictionary+Removals.swift index 678b97e0..0fa97c1b 100644 --- a/Sources/BasicContainers/UniqueDictionary/UniqueDictionary+Removals.swift +++ b/Sources/BasicContainers/UniqueDictionary/UniqueDictionary+Removals.swift @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_HASHED_CONTAINERS +#if compiler(>=6.4) && UnstableHashedContainers @available(SwiftStdlib 5.0, *) extension UniqueDictionary where Key: ~Copyable, Value: ~Copyable { diff --git a/Sources/BasicContainers/UniqueDictionary/UniqueDictionary+Resizing.swift b/Sources/BasicContainers/UniqueDictionary/UniqueDictionary+Resizing.swift index 55ff8903..ec692dcb 100644 --- a/Sources/BasicContainers/UniqueDictionary/UniqueDictionary+Resizing.swift +++ b/Sources/BasicContainers/UniqueDictionary/UniqueDictionary+Resizing.swift @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_HASHED_CONTAINERS +#if compiler(>=6.4) && UnstableHashedContainers @available(SwiftStdlib 5.0, *) extension UniqueDictionary where Key: ~Copyable, Value: ~Copyable { diff --git a/Sources/BasicContainers/UniqueDictionary/UniqueDictionary.swift b/Sources/BasicContainers/UniqueDictionary/UniqueDictionary.swift index 0ddeede9..264ccea4 100644 --- a/Sources/BasicContainers/UniqueDictionary/UniqueDictionary.swift +++ b/Sources/BasicContainers/UniqueDictionary/UniqueDictionary.swift @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#if COLLECTIONS_UNSTABLE_HASHED_CONTAINERS +#if UnstableHashedContainers #if compiler(<6.4) @available(*, unavailable, message: "UniqueDictionary requires a Swift 6.4 toolchain") public struct UniqueDictionary< diff --git a/Sources/BasicContainers/UniqueSet/UniqueSet+BorrowingSequence.swift b/Sources/BasicContainers/UniqueSet/UniqueSet+BorrowingSequence.swift index 816a71e1..7f842356 100644 --- a/Sources/BasicContainers/UniqueSet/UniqueSet+BorrowingSequence.swift +++ b/Sources/BasicContainers/UniqueSet/UniqueSet+BorrowingSequence.swift @@ -16,7 +16,7 @@ import InternalCollectionsUtilities import ContainersPreview #endif -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_HASHED_CONTAINERS && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && UnstableHashedContainers && UnstableContainersPreview @available(SwiftStdlib 5.0, *) extension UniqueSet: BorrowingSequence_ where Element: ~Copyable { diff --git a/Sources/BasicContainers/UniqueSet/UniqueSet+Consumption.swift b/Sources/BasicContainers/UniqueSet/UniqueSet+Consumption.swift index cb941b6b..8b3d32a9 100644 --- a/Sources/BasicContainers/UniqueSet/UniqueSet+Consumption.swift +++ b/Sources/BasicContainers/UniqueSet/UniqueSet+Consumption.swift @@ -15,11 +15,11 @@ import ContainersPreview #endif -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_HASHED_CONTAINERS && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && UnstableHashedContainers && UnstableContainersPreview @available(SwiftStdlib 5.0, *) extension UniqueSet where Element: ~Copyable { -#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if UnstableContainersPreview @inlinable public mutating func consumeAll( consumingWith consumer: (inout InputSpan) -> Void diff --git a/Sources/BasicContainers/UniqueSet/UniqueSet+Debugging.swift b/Sources/BasicContainers/UniqueSet/UniqueSet+Debugging.swift index ec7fcc80..6fbe1d2f 100644 --- a/Sources/BasicContainers/UniqueSet/UniqueSet+Debugging.swift +++ b/Sources/BasicContainers/UniqueSet/UniqueSet+Debugging.swift @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_HASHED_CONTAINERS +#if compiler(>=6.4) && UnstableHashedContainers @available(SwiftStdlib 5.0, *) extension UniqueSet where Element: ~Copyable { diff --git a/Sources/BasicContainers/UniqueSet/UniqueSet+Equatable.swift b/Sources/BasicContainers/UniqueSet/UniqueSet+Equatable.swift index 39ac541e..3bd9e660 100644 --- a/Sources/BasicContainers/UniqueSet/UniqueSet+Equatable.swift +++ b/Sources/BasicContainers/UniqueSet/UniqueSet+Equatable.swift @@ -17,7 +17,7 @@ import ContainersPreview #endif -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_HASHED_CONTAINERS && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && UnstableHashedContainers && UnstableContainersPreview @available(SwiftStdlib 5.0, *) extension UniqueSet { diff --git a/Sources/BasicContainers/UniqueSet/UniqueSet+Hashable.swift b/Sources/BasicContainers/UniqueSet/UniqueSet+Hashable.swift index 06d8c36b..61468f5a 100644 --- a/Sources/BasicContainers/UniqueSet/UniqueSet+Hashable.swift +++ b/Sources/BasicContainers/UniqueSet/UniqueSet+Hashable.swift @@ -16,7 +16,7 @@ import InternalCollectionsUtilities import ContainersPreview #endif -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_HASHED_CONTAINERS && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && UnstableHashedContainers && UnstableContainersPreview @available(SwiftStdlib 6.4, *) extension UniqueSet: Hashable {} diff --git a/Sources/BasicContainers/UniqueSet/UniqueSet+Index.swift b/Sources/BasicContainers/UniqueSet/UniqueSet+Index.swift index 7ee2a6ca..4dc1f451 100644 --- a/Sources/BasicContainers/UniqueSet/UniqueSet+Index.swift +++ b/Sources/BasicContainers/UniqueSet/UniqueSet+Index.swift @@ -15,7 +15,7 @@ import ContainersPreview #endif -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_HASHED_CONTAINERS +#if compiler(>=6.4) && UnstableHashedContainers @available(SwiftStdlib 5.0, *) extension UniqueSet where Element: ~Copyable { diff --git a/Sources/BasicContainers/UniqueSet/UniqueSet+Initializers.swift b/Sources/BasicContainers/UniqueSet/UniqueSet+Initializers.swift index bda66f57..86c4b8f0 100644 --- a/Sources/BasicContainers/UniqueSet/UniqueSet+Initializers.swift +++ b/Sources/BasicContainers/UniqueSet/UniqueSet+Initializers.swift @@ -15,7 +15,7 @@ import ContainersPreview #endif -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_HASHED_CONTAINERS +#if compiler(>=6.4) && UnstableHashedContainers @available(SwiftStdlib 5.0, *) extension UniqueSet where Element: ~Copyable { @@ -50,7 +50,7 @@ extension UniqueSet where Element: ~Copyable { initializingWith: initializer) } -#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if UnstableContainersPreview @_alwaysEmitIntoClient public init< E: Error, @@ -74,7 +74,7 @@ extension UniqueSet where Element: ~Copyable { @available(SwiftStdlib 5.0, *) extension UniqueSet where Element: Copyable { -#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if UnstableContainersPreview @_alwaysEmitIntoClient public init< S: BorrowingSequence_ & ~Copyable & ~Escapable @@ -92,7 +92,7 @@ extension UniqueSet where Element: Copyable { self.insert(copying: items) } -#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if UnstableContainersPreview @_alwaysEmitIntoClient public init< S: BorrowingSequence_ & Sequence diff --git a/Sources/BasicContainers/UniqueSet/UniqueSet+Insertions.swift b/Sources/BasicContainers/UniqueSet/UniqueSet+Insertions.swift index a0668ab3..60979e0e 100644 --- a/Sources/BasicContainers/UniqueSet/UniqueSet+Insertions.swift +++ b/Sources/BasicContainers/UniqueSet/UniqueSet+Insertions.swift @@ -15,7 +15,7 @@ import ContainersPreview #endif -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_HASHED_CONTAINERS +#if compiler(>=6.4) && UnstableHashedContainers @available(SwiftStdlib 5.0, *) extension UniqueSet where Element: ~Copyable { @@ -79,7 +79,7 @@ extension UniqueSet where Element: ~Copyable { maximumCount: maximumCount, initializingWith: initializer) } -#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if UnstableContainersPreview @_alwaysEmitIntoClient public mutating func insert< E: Error, @@ -101,7 +101,7 @@ extension UniqueSet where Element: ~Copyable { } #endif -#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if UnstableContainersPreview @_alwaysEmitIntoClient public mutating func insert< D: Drain & ~Copyable & ~Escapable @@ -129,7 +129,7 @@ extension UniqueSet /* where Element: Copyable */ { _storage.insert(copying: items) } -#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if UnstableContainersPreview @_alwaysEmitIntoClient package mutating func _insert< S: BorrowingSequence_ & ~Copyable & ~Escapable @@ -146,7 +146,7 @@ extension UniqueSet /* where Element: Copyable */ { } #endif -#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if UnstableContainersPreview @_alwaysEmitIntoClient @inline(__always) public mutating func insert< @@ -168,7 +168,7 @@ extension UniqueSet /* where Element: Copyable */ { } } -#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if UnstableContainersPreview @_alwaysEmitIntoClient @inline(__always) public mutating func insert< diff --git a/Sources/BasicContainers/UniqueSet/UniqueSet+Lookup.swift b/Sources/BasicContainers/UniqueSet/UniqueSet+Lookup.swift index 6e3c306a..a7f22134 100644 --- a/Sources/BasicContainers/UniqueSet/UniqueSet+Lookup.swift +++ b/Sources/BasicContainers/UniqueSet/UniqueSet+Lookup.swift @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_HASHED_CONTAINERS +#if compiler(>=6.4) && UnstableHashedContainers @available(SwiftStdlib 5.0, *) extension UniqueSet where Element: ~Copyable { diff --git a/Sources/BasicContainers/UniqueSet/UniqueSet+Removals.swift b/Sources/BasicContainers/UniqueSet/UniqueSet+Removals.swift index 43941f23..92ef7df9 100644 --- a/Sources/BasicContainers/UniqueSet/UniqueSet+Removals.swift +++ b/Sources/BasicContainers/UniqueSet/UniqueSet+Removals.swift @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_HASHED_CONTAINERS +#if compiler(>=6.4) && UnstableHashedContainers @available(SwiftStdlib 5.0, *) extension UniqueSet where Element: ~Copyable { diff --git a/Sources/BasicContainers/UniqueSet/UniqueSet+Resizing.swift b/Sources/BasicContainers/UniqueSet/UniqueSet+Resizing.swift index 784c2550..95ec71d0 100644 --- a/Sources/BasicContainers/UniqueSet/UniqueSet+Resizing.swift +++ b/Sources/BasicContainers/UniqueSet/UniqueSet+Resizing.swift @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_HASHED_CONTAINERS +#if compiler(>=6.4) && UnstableHashedContainers @available(SwiftStdlib 5.0, *) extension UniqueSet where Element: ~Copyable { diff --git a/Sources/BasicContainers/UniqueSet/UniqueSet.swift b/Sources/BasicContainers/UniqueSet/UniqueSet.swift index ed28f3c6..f47d5ba9 100644 --- a/Sources/BasicContainers/UniqueSet/UniqueSet.swift +++ b/Sources/BasicContainers/UniqueSet/UniqueSet.swift @@ -16,7 +16,7 @@ import InternalCollectionsUtilities import ContainersPreview #endif -#if COLLECTIONS_UNSTABLE_HASHED_CONTAINERS +#if UnstableHashedContainers #if compiler(<6.4) @available(*, unavailable, message: "UniqueSet requires a Swift 6.4 toolchain") public struct UniqueSet: ~Copyable { diff --git a/Sources/ContainersPreview/Extensions/OutputSpan+Extras.swift b/Sources/ContainersPreview/Extensions/OutputSpan+Extras.swift index 8fd34922..d0df65f4 100644 --- a/Sources/ContainersPreview/Extensions/OutputSpan+Extras.swift +++ b/Sources/ContainersPreview/Extensions/OutputSpan+Extras.swift @@ -71,7 +71,7 @@ extension OutputSpan where Element: ~Copyable { } } -#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if UnstableContainersPreview @_lifetime(source: copy source) @inlinable @inline(__always) diff --git a/Sources/ContainersPreview/Protocols/BorrowingIteratorProtocol+Copy.swift b/Sources/ContainersPreview/Protocols/BorrowingIteratorProtocol+Copy.swift index bc9ae7b6..ed3adc60 100644 --- a/Sources/ContainersPreview/Protocols/BorrowingIteratorProtocol+Copy.swift +++ b/Sources/ContainersPreview/Protocols/BorrowingIteratorProtocol+Copy.swift @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && UnstableContainersPreview @available(SwiftStdlib 5.0, *) extension BorrowingIteratorProtocol_ diff --git a/Sources/ContainersPreview/Protocols/BorrowingIteratorProtocol+ElementsEqual.swift b/Sources/ContainersPreview/Protocols/BorrowingIteratorProtocol+ElementsEqual.swift index 66557499..d9de4204 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.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && UnstableContainersPreview @available(SwiftStdlib 5.0, *) extension BorrowingSequence_ diff --git a/Sources/ContainersPreview/Protocols/BorrowingIteratorProtocol+Filter.swift b/Sources/ContainersPreview/Protocols/BorrowingIteratorProtocol+Filter.swift index 640d416b..fad81bc8 100644 --- a/Sources/ContainersPreview/Protocols/BorrowingIteratorProtocol+Filter.swift +++ b/Sources/ContainersPreview/Protocols/BorrowingIteratorProtocol+Filter.swift @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && UnstableContainersPreview @available(SwiftStdlib 5.0, *) extension BorrowingIteratorProtocol_ diff --git a/Sources/ContainersPreview/Protocols/BorrowingIteratorProtocol+Map.swift b/Sources/ContainersPreview/Protocols/BorrowingIteratorProtocol+Map.swift index ef7939f6..342a5972 100644 --- a/Sources/ContainersPreview/Protocols/BorrowingIteratorProtocol+Map.swift +++ b/Sources/ContainersPreview/Protocols/BorrowingIteratorProtocol+Map.swift @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && UnstableContainersPreview @available(SwiftStdlib 5.0, *) extension BorrowingIteratorProtocol_ diff --git a/Sources/ContainersPreview/Protocols/BorrowingIteratorProtocol+Reduce.swift b/Sources/ContainersPreview/Protocols/BorrowingIteratorProtocol+Reduce.swift index 22f446b8..9e78630b 100644 --- a/Sources/ContainersPreview/Protocols/BorrowingIteratorProtocol+Reduce.swift +++ b/Sources/ContainersPreview/Protocols/BorrowingIteratorProtocol+Reduce.swift @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && UnstableContainersPreview @available(SwiftStdlib 5.0, *) extension BorrowingIteratorProtocol_ diff --git a/Sources/ContainersPreview/Protocols/BorrowingIteratorProtocol+SpanwiseZip.swift b/Sources/ContainersPreview/Protocols/BorrowingIteratorProtocol+SpanwiseZip.swift index 599ea1ba..05c57b92 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.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && UnstableContainersPreview @available(SwiftStdlib 5.0, *) extension BorrowingIteratorProtocol_ diff --git a/Sources/ContainersPreview/Protocols/BorrowingIteratorProtocol.swift b/Sources/ContainersPreview/Protocols/BorrowingIteratorProtocol.swift index 9352e69f..7fdf6b38 100644 --- a/Sources/ContainersPreview/Protocols/BorrowingIteratorProtocol.swift +++ b/Sources/ContainersPreview/Protocols/BorrowingIteratorProtocol.swift @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && UnstableContainersPreview #if !COLLECTIONS_SINGLE_MODULE import InternalCollectionsUtilities diff --git a/Sources/ContainersPreview/Protocols/BorrowingSequence+Algorithms.swift b/Sources/ContainersPreview/Protocols/BorrowingSequence+Algorithms.swift index ab34927f..37af4bec 100644 --- a/Sources/ContainersPreview/Protocols/BorrowingSequence+Algorithms.swift +++ b/Sources/ContainersPreview/Protocols/BorrowingSequence+Algorithms.swift @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && UnstableContainersPreview @available(SwiftStdlib 5.0, *) extension BorrowingSequence_ diff --git a/Sources/ContainersPreview/Protocols/BorrowingSequence+Standard Conformances.swift b/Sources/ContainersPreview/Protocols/BorrowingSequence+Standard Conformances.swift index 3fd598a5..c0ed1d80 100644 --- a/Sources/ContainersPreview/Protocols/BorrowingSequence+Standard Conformances.swift +++ b/Sources/ContainersPreview/Protocols/BorrowingSequence+Standard Conformances.swift @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && UnstableContainersPreview @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 79f534a7..39357237 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.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && UnstableContainersPreview @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 4ebd1b0e..6c961716 100644 --- a/Sources/ContainersPreview/Protocols/BorrowingSequence.swift +++ b/Sources/ContainersPreview/Protocols/BorrowingSequence.swift @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && UnstableContainersPreview @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 a9f8c0f3..332c97ff 100644 --- a/Sources/ContainersPreview/Protocols/Container/BidirectionalContainer.swift +++ b/Sources/ContainersPreview/Protocols/Container/BidirectionalContainer.swift @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && UnstableContainersPreview @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 92bb6bcb..41592694 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.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && UnstableContainersPreview @available(SwiftStdlib 5.0, *) extension Container where Self: ~Copyable /*& ~Escapable*/, Element: ~Copyable { diff --git a/Sources/ContainersPreview/Protocols/Container/Container+SpanwiseZip.swift b/Sources/ContainersPreview/Protocols/Container/Container+SpanwiseZip.swift index a0d37152..32e53ebd 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.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && UnstableContainersPreview @available(SwiftStdlib 5.0, *) extension Container where Self: ~Copyable & ~Escapable, Element: ~Copyable { diff --git a/Sources/ContainersPreview/Protocols/Container/Container.swift b/Sources/ContainersPreview/Protocols/Container/Container.swift index 3fdec855..ae4443a1 100644 --- a/Sources/ContainersPreview/Protocols/Container/Container.swift +++ b/Sources/ContainersPreview/Protocols/Container/Container.swift @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && UnstableContainersPreview @available(SwiftStdlib 5.0, *) public protocol Container: diff --git a/Sources/ContainersPreview/Protocols/Container/ContainerIterator.swift b/Sources/ContainersPreview/Protocols/Container/ContainerIterator.swift index 0abb358b..6e8b7680 100644 --- a/Sources/ContainersPreview/Protocols/Container/ContainerIterator.swift +++ b/Sources/ContainersPreview/Protocols/Container/ContainerIterator.swift @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && UnstableContainersPreview @available(SwiftStdlib 5.0, *) extension Container diff --git a/Sources/ContainersPreview/Protocols/Container/DynamicContainer.swift b/Sources/ContainersPreview/Protocols/Container/DynamicContainer.swift index af9e4603..389f3153 100644 --- a/Sources/ContainersPreview/Protocols/Container/DynamicContainer.swift +++ b/Sources/ContainersPreview/Protocols/Container/DynamicContainer.swift @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && UnstableContainersPreview @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 92456fb2..06516f54 100644 --- a/Sources/ContainersPreview/Protocols/Container/MutableContainer.swift +++ b/Sources/ContainersPreview/Protocols/Container/MutableContainer.swift @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && UnstableContainersPreview @available(SwiftStdlib 5.0, *) public protocol MutableContainer: diff --git a/Sources/ContainersPreview/Protocols/Container/PermutableContainer.swift b/Sources/ContainersPreview/Protocols/Container/PermutableContainer.swift index 2aaf5b90..8cfe7224 100644 --- a/Sources/ContainersPreview/Protocols/Container/PermutableContainer.swift +++ b/Sources/ContainersPreview/Protocols/Container/PermutableContainer.swift @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && UnstableContainersPreview @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 44f19a6b..08acb559 100644 --- a/Sources/ContainersPreview/Protocols/Container/RandomAccessContainer.swift +++ b/Sources/ContainersPreview/Protocols/Container/RandomAccessContainer.swift @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && UnstableContainersPreview @available(SwiftStdlib 5.0, *) public protocol RandomAccessContainer diff --git a/Sources/ContainersPreview/Protocols/Container/RangeExpression2.swift b/Sources/ContainersPreview/Protocols/Container/RangeExpression2.swift index 6baf1683..2814339b 100644 --- a/Sources/ContainersPreview/Protocols/Container/RangeExpression2.swift +++ b/Sources/ContainersPreview/Protocols/Container/RangeExpression2.swift @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && UnstableContainersPreview // 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 1007024e..44c8045a 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.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && UnstableContainersPreview //MARK: - Protocol Definition diff --git a/Sources/ContainersPreview/Protocols/Container/Strideable+Limits.swift b/Sources/ContainersPreview/Protocols/Container/Strideable+Limits.swift index 119a9698..0e090a09 100644 --- a/Sources/ContainersPreview/Protocols/Container/Strideable+Limits.swift +++ b/Sources/ContainersPreview/Protocols/Container/Strideable+Limits.swift @@ -37,7 +37,7 @@ extension Strideable { } } -#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if UnstableContainersPreview @inlinable public mutating func advance( by distance: inout Stride, limitedBy limit: Self diff --git a/Sources/ContainersPreview/Protocols/Drain+Map.swift b/Sources/ContainersPreview/Protocols/Drain+Map.swift index 85077d37..319091b8 100644 --- a/Sources/ContainersPreview/Protocols/Drain+Map.swift +++ b/Sources/ContainersPreview/Protocols/Drain+Map.swift @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && UnstableContainersPreview @available(SwiftStdlib 5.0, *) extension Drain where Self: ~Copyable & ~Escapable, Element: ~Copyable { diff --git a/Sources/ContainersPreview/Protocols/Drain+Reduce.swift b/Sources/ContainersPreview/Protocols/Drain+Reduce.swift index 9c53dff2..25938273 100644 --- a/Sources/ContainersPreview/Protocols/Drain+Reduce.swift +++ b/Sources/ContainersPreview/Protocols/Drain+Reduce.swift @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && UnstableContainersPreview @available(SwiftStdlib 5.0, *) extension Drain where Self: ~Copyable & ~Escapable, Element: ~Copyable { diff --git a/Sources/ContainersPreview/Protocols/Drain.swift b/Sources/ContainersPreview/Protocols/Drain.swift index 81e73069..79ec964a 100644 --- a/Sources/ContainersPreview/Protocols/Drain.swift +++ b/Sources/ContainersPreview/Protocols/Drain.swift @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && UnstableContainersPreview /// 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 d433d254..a1d169dd 100644 --- a/Sources/ContainersPreview/Protocols/Producer+Collect.swift +++ b/Sources/ContainersPreview/Protocols/Producer+Collect.swift @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && UnstableContainersPreview @available(SwiftStdlib 5.0, *) extension Producer where Self: ~Copyable & ~Escapable, Element: ~Copyable { diff --git a/Sources/ContainersPreview/Protocols/Producer+Filter.swift b/Sources/ContainersPreview/Protocols/Producer+Filter.swift index 19eb3aa5..cec00ff5 100644 --- a/Sources/ContainersPreview/Protocols/Producer+Filter.swift +++ b/Sources/ContainersPreview/Protocols/Producer+Filter.swift @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && UnstableContainersPreview @available(SwiftStdlib 5.0, *) extension Producer where Self: ~Copyable & ~Escapable, Element: ~Copyable { diff --git a/Sources/ContainersPreview/Protocols/Producer+Map.swift b/Sources/ContainersPreview/Protocols/Producer+Map.swift index f9904533..05bba6be 100644 --- a/Sources/ContainersPreview/Protocols/Producer+Map.swift +++ b/Sources/ContainersPreview/Protocols/Producer+Map.swift @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && UnstableContainersPreview @available(SwiftStdlib 5.0, *) extension Producer where Self: ~Copyable & ~Escapable, Element: ~Copyable { diff --git a/Sources/ContainersPreview/Protocols/Producer+Reduce.swift b/Sources/ContainersPreview/Protocols/Producer+Reduce.swift index f5093227..1807dd18 100644 --- a/Sources/ContainersPreview/Protocols/Producer+Reduce.swift +++ b/Sources/ContainersPreview/Protocols/Producer+Reduce.swift @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && UnstableContainersPreview @available(SwiftStdlib 5.0, *) extension Producer where Self: ~Copyable & ~Escapable, Element: ~Copyable { diff --git a/Sources/ContainersPreview/Protocols/Producer.swift b/Sources/ContainersPreview/Protocols/Producer.swift index 1e03167a..eb848282 100644 --- a/Sources/ContainersPreview/Protocols/Producer.swift +++ b/Sources/ContainersPreview/Protocols/Producer.swift @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && UnstableContainersPreview @_alwaysEmitIntoClient @_transparent diff --git a/Sources/ContainersPreview/Types/Borrow.swift b/Sources/ContainersPreview/Types/Borrow.swift index d988d3ff..d606a1e7 100644 --- a/Sources/ContainersPreview/Types/Borrow.swift +++ b/Sources/ContainersPreview/Types/Borrow.swift @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#if compiler(>=6.2) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.2) && UnstableContainersPreview import Builtin @available(SwiftStdlib 5.0, *) diff --git a/Sources/ContainersPreview/Types/Inout.swift b/Sources/ContainersPreview/Types/Inout.swift index 3c8f99be..1afc3c0d 100644 --- a/Sources/ContainersPreview/Types/Inout.swift +++ b/Sources/ContainersPreview/Types/Inout.swift @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#if compiler(>=6.3) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.3) && UnstableContainersPreview import Builtin /// A safe mutable reference allowing in-place mutation to an exclusive value. diff --git a/Sources/ContainersPreview/Types/InputSpan.swift b/Sources/ContainersPreview/Types/InputSpan.swift index 8bce270b..2f4b6c48 100644 --- a/Sources/ContainersPreview/Types/InputSpan.swift +++ b/Sources/ContainersPreview/Types/InputSpan.swift @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#if compiler(>=6.2) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.2) && UnstableContainersPreview #if !COLLECTIONS_SINGLE_MODULE import InternalCollectionsUtilities diff --git a/Sources/ContainersPreview/Types/Shared.swift b/Sources/ContainersPreview/Types/Shared.swift index e9241d3c..80abbaf0 100644 --- a/Sources/ContainersPreview/Types/Shared.swift +++ b/Sources/ContainersPreview/Types/Shared.swift @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#if compiler(>=6.2) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.2) && UnstableContainersPreview #if false // TODO import Builtin // For Shared.isIdentical diff --git a/Sources/ContainersPreview/Types/SpanIterator.swift b/Sources/ContainersPreview/Types/SpanIterator.swift index d185706b..a5513c27 100644 --- a/Sources/ContainersPreview/Types/SpanIterator.swift +++ b/Sources/ContainersPreview/Types/SpanIterator.swift @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && UnstableContainersPreview /// A borrowing iterator that provides access to the elements of a single /// span through a `BorrowingIteratorProtocol` interface. diff --git a/Sources/ContainersPreview/Types/UniqueBox.swift b/Sources/ContainersPreview/Types/UniqueBox.swift index bf0217a1..e6d882b5 100644 --- a/Sources/ContainersPreview/Types/UniqueBox.swift +++ b/Sources/ContainersPreview/Types/UniqueBox.swift @@ -85,7 +85,7 @@ public struct UniqueBox: ~Copyable { extension UniqueBox: @unchecked Sendable where Value: Sendable & ~Copyable {} extension UniqueBox where Value: ~Copyable { -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && UnstableContainersPreview @_alwaysEmitIntoClient public var value: Value { @_transparent @@ -185,7 +185,7 @@ extension UniqueBox where Value: Copyable { } extension UniqueBox where Value: ~Copyable { -#if compiler(>=6.3) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.3) && UnstableContainersPreview /// Leak the heap allocation behind this box, converting it into an /// immortal mutating reference. @_alwaysEmitIntoClient @@ -198,7 +198,7 @@ extension UniqueBox where Value: ~Copyable { } #endif -#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if UnstableContainersPreview /// Return a borrowing reference to the contents of this box. @available(SwiftStdlib 5.0, *) @_alwaysEmitIntoClient @@ -209,7 +209,7 @@ extension UniqueBox where Value: ~Copyable { } #endif -#if compiler(>=6.3) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.3) && UnstableContainersPreview /// Return a mutating reference to the contents of this box. @_alwaysEmitIntoClient @_transparent diff --git a/Sources/DequeModule/RigidDeque/RigidDeque+Append.swift b/Sources/DequeModule/RigidDeque/RigidDeque+Append.swift index bc147048..c8916110 100644 --- a/Sources/DequeModule/RigidDeque/RigidDeque+Append.swift +++ b/Sources/DequeModule/RigidDeque/RigidDeque+Append.swift @@ -134,7 +134,7 @@ extension RigidDeque where Element: ~Copyable { _handle.uncheckedAppend(moving: items) } -#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if UnstableContainersPreview /// Moves the elements of an input span by appending them to the end of /// this deque, leaving the span empty. /// @@ -178,7 +178,7 @@ extension RigidDeque where Element: ~Copyable { } } -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && UnstableContainersPreview /// Appends at most `newItemCount` items generated by a producer to the end of /// this deque. /// @@ -215,7 +215,7 @@ extension RigidDeque where Element: ~Copyable { } #endif -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && UnstableContainersPreview /// 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 @@ -310,7 +310,7 @@ extension RigidDeque /*where Element: Copyable*/ { } } -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && UnstableContainersPreview @_alwaysEmitIntoClient internal mutating func _append< S: BorrowingSequence_ & ~Copyable & ~Escapable @@ -363,7 +363,7 @@ extension RigidDeque /*where Element: Copyable*/ { precondition(it.next() == nil, "RigidDeque capacity overflow") } -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && UnstableContainersPreview /// 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 b8f002d4..5fab8ebb 100644 --- a/Sources/DequeModule/RigidDeque/RigidDeque+Consumption.swift +++ b/Sources/DequeModule/RigidDeque/RigidDeque+Consumption.swift @@ -20,7 +20,7 @@ import ContainersPreview @available(SwiftStdlib 5.0, *) extension RigidDeque where Element: ~Copyable { -#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if UnstableContainersPreview /// Remove the specified subrange of items from this deque, /// passing a series of input spans to a given callback function to consume /// them in place. @@ -164,7 +164,7 @@ extension RigidDeque where Element: ~Copyable { #endif } -#if compiler(>=6.3) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.3) && UnstableContainersPreview @available(SwiftStdlib 5.0, *) extension RigidDeque where Element: ~Copyable { @_alwaysEmitIntoClient diff --git a/Sources/DequeModule/RigidDeque/RigidDeque+Container.swift b/Sources/DequeModule/RigidDeque/RigidDeque+Container.swift index 0f0cc371..d729769c 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 compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && UnstableContainersPreview @frozen public struct BorrowingIterator: ~Escapable, BorrowingIteratorProtocol_ { public typealias Element_ = Element @@ -66,7 +66,7 @@ extension RigidDeque where Element: ~Copyable { #endif } -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && UnstableContainersPreview @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 d47b7dea..c506ba5c 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 compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && UnstableContainersPreview return left._elementsEqual(right) #else for i in 0 ..< left.count { diff --git a/Sources/DequeModule/RigidDeque/RigidDeque+Experimental.swift b/Sources/DequeModule/RigidDeque/RigidDeque+Experimental.swift index 8a0954a2..77aca696 100644 --- a/Sources/DequeModule/RigidDeque/RigidDeque+Experimental.swift +++ b/Sources/DequeModule/RigidDeque/RigidDeque+Experimental.swift @@ -16,7 +16,7 @@ import InternalCollectionsUtilities import ContainersPreview #endif -#if compiler(>=6.2) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.2) && UnstableContainersPreview #if false // FIXME @available(SwiftStdlib 5.0, *) diff --git a/Sources/DequeModule/RigidDeque/RigidDeque+Initializers.swift b/Sources/DequeModule/RigidDeque/RigidDeque+Initializers.swift index a3c27313..ef924870 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 compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && UnstableContainersPreview /// Creates a new rigid deque of the specified capacity, populating it with /// all items generated by a given producer. /// @@ -121,7 +121,7 @@ extension RigidDeque /*where Element: Copyable*/ { @available(SwiftStdlib 5.0, *) extension RigidDeque /*where Element: Copyable*/ { -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && UnstableContainersPreview /// Creates a new deque with the specified capacity, holding a copy /// of the contents of a given borrowing sequence. /// @@ -176,7 +176,7 @@ extension RigidDeque /*where Element: Copyable*/ { self.append(copying: contents) } -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && UnstableContainersPreview /// 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 2b2c60a4..19a07eb8 100644 --- a/Sources/DequeModule/RigidDeque/RigidDeque+Insertions.swift +++ b/Sources/DequeModule/RigidDeque/RigidDeque+Insertions.swift @@ -146,7 +146,7 @@ extension RigidDeque where Element: ~Copyable { assert(remainder.isEmpty) } -#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if UnstableContainersPreview /// Moves the elements of an input span into this deque, /// starting at the specified position, and leaving the span empty. /// @@ -209,7 +209,7 @@ extension RigidDeque where Element: ~Copyable { @available(SwiftStdlib 5.0, *) extension RigidDeque where Element: ~Copyable { -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && UnstableContainersPreview /// Inserts at most `newItemCount` items generated by a producer into this /// deque, starting at the given index. /// @@ -355,7 +355,7 @@ extension RigidDeque /* where Element: Copyable */ { } } -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && UnstableContainersPreview @inlinable internal mutating func _insertContainer< C: Container & ~Copyable & ~Escapable @@ -397,7 +397,7 @@ extension RigidDeque /* where Element: Copyable */ { "Broken Collection: count doesn't match contents") } -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && UnstableContainersPreview /// Copies the elements of a container into this deque at the specified /// position. /// @@ -459,7 +459,7 @@ extension RigidDeque /* where Element: Copyable */ { at: index, copying: items, newCount: items.count) } -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && UnstableContainersPreview /// 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 c9b1fe54..171e8c94 100644 --- a/Sources/DequeModule/RigidDeque/RigidDeque+Prepend.swift +++ b/Sources/DequeModule/RigidDeque/RigidDeque+Prepend.swift @@ -139,7 +139,7 @@ extension RigidDeque where Element: ~Copyable { _handle.uncheckedPrepend(moving: items) } -#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if UnstableContainersPreview /// Moves the elements of an input span by prepending them to the front of /// this deque, leaving the span empty. /// @@ -183,7 +183,7 @@ extension RigidDeque where Element: ~Copyable { } } -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && UnstableContainersPreview /// Prepends at most `newItemCount` items generated by a producer to the /// front of this deque. /// @@ -287,7 +287,7 @@ extension RigidDeque /*where Element: Copyable*/ { } } -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && UnstableContainersPreview @inlinable internal mutating func _prepend< S: BorrowingSequence_ & ~Copyable & ~Escapable @@ -426,7 +426,7 @@ extension RigidDeque /*where Element: Copyable*/ { _handle.uncheckedPrepend(copying: items, exactCount: c) } -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && UnstableContainersPreview /// Copies the elements of a borrowing sequence to the front 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 1da555c1..19e96708 100644 --- a/Sources/DequeModule/RigidDeque/RigidDeque+Replacements.swift +++ b/Sources/DequeModule/RigidDeque/RigidDeque+Replacements.swift @@ -77,7 +77,7 @@ extension RigidDeque where Element: ~Copyable { initializingWith: initializer) } -#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if UnstableContainersPreview /// Replaces the specified range of elements by a given count of new items, /// using callbacks to consume old items, and to then insert new ones. /// @@ -201,7 +201,7 @@ extension RigidDeque where Element: ~Copyable { assert(remainder.isEmpty) } -#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if UnstableContainersPreview /// Replaces the specified range of elements by moving the contents of an /// input span into their place. On return, the span is left empty. /// @@ -279,7 +279,7 @@ extension RigidDeque where Element: ~Copyable { } } -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && UnstableContainersPreview /// Replaces the specified range of elements by at most `newItemCount` items /// generated by a producer. /// @@ -455,7 +455,7 @@ extension RigidDeque /* where Element: Copyable */ { } } -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && UnstableContainersPreview @inlinable internal mutating func _replace< C: Container & ~Copyable & ~Escapable @@ -502,7 +502,7 @@ extension RigidDeque /* where Element: Copyable */ { "Broken Collection: count doesn't match contents") } -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && UnstableContainersPreview /// Replaces the specified subrange of elements by copying the elements of /// the given container. /// @@ -578,7 +578,7 @@ extension RigidDeque /* where Element: Copyable */ { removing: subrange, copyingCollection: items, newCount: items.count) } -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && UnstableContainersPreview /// 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 0fef3726..59e86a97 100644 --- a/Sources/DequeModule/UniqueDeque/UniqueDeque+Append.swift +++ b/Sources/DequeModule/UniqueDeque/UniqueDeque+Append.swift @@ -120,7 +120,7 @@ extension UniqueDeque where Element: ~Copyable { _storage._handle.uncheckedAppend(moving: items) } -#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if UnstableContainersPreview /// Moves the elements of an input span by appending them to the end of /// this deque, leaving the span empty. /// @@ -168,7 +168,7 @@ extension UniqueDeque where Element: ~Copyable { } } -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && UnstableContainersPreview /// Appends at most `newItemCount` items generated by a producer to the end of /// this deque. /// @@ -203,7 +203,7 @@ extension UniqueDeque where Element: ~Copyable { } #endif -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && UnstableContainersPreview /// 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 @@ -297,7 +297,7 @@ extension UniqueDeque /*where Element: Copyable*/ { _storage.append(copying: items) } -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && UnstableContainersPreview @_alwaysEmitIntoClient internal mutating func _append< S: BorrowingSequence_ & ~Copyable & ~Escapable @@ -360,7 +360,7 @@ extension UniqueDeque /*where Element: Copyable*/ { } } -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && UnstableContainersPreview /// 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+Consumption.swift b/Sources/DequeModule/UniqueDeque/UniqueDeque+Consumption.swift index 7b394830..5e487c71 100644 --- a/Sources/DequeModule/UniqueDeque/UniqueDeque+Consumption.swift +++ b/Sources/DequeModule/UniqueDeque/UniqueDeque+Consumption.swift @@ -20,7 +20,7 @@ import ContainersPreview @available(SwiftStdlib 5.0, *) extension UniqueDeque where Element: ~Copyable { -#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if UnstableContainersPreview /// Remove the specified subrange of items from this deque, /// passing a series of input spans to a given callback function to consume /// them in place. @@ -147,7 +147,7 @@ extension UniqueDeque where Element: ~Copyable { #endif } -#if compiler(>=6.3) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.3) && UnstableContainersPreview @available(SwiftStdlib 5.0, *) extension UniqueDeque where Element: ~Copyable { public typealias SubrangeConsumer = RigidDeque.SubrangeConsumer diff --git a/Sources/DequeModule/UniqueDeque/UniqueDeque+Container.swift b/Sources/DequeModule/UniqueDeque/UniqueDeque+Container.swift index 5b0121a2..fcdae58a 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 compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && UnstableContainersPreview public typealias BorrowingIterator = RigidDeque.BorrowingIterator @_alwaysEmitIntoClient @@ -32,7 +32,7 @@ extension UniqueDeque where Element: ~Copyable { #endif } -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && UnstableContainersPreview @available(SwiftStdlib 5.0, *) extension UniqueDeque: Container where Element: ~Copyable {} diff --git a/Sources/DequeModule/UniqueDeque/UniqueDeque+Experimental.swift b/Sources/DequeModule/UniqueDeque/UniqueDeque+Experimental.swift index 331f527a..842cf09c 100644 --- a/Sources/DequeModule/UniqueDeque/UniqueDeque+Experimental.swift +++ b/Sources/DequeModule/UniqueDeque/UniqueDeque+Experimental.swift @@ -16,7 +16,7 @@ import InternalCollectionsUtilities import ContainersPreview #endif -#if compiler(>=6.2) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.2) && UnstableContainersPreview #if false // FIXME diff --git a/Sources/DequeModule/UniqueDeque/UniqueDeque+Initializers.swift b/Sources/DequeModule/UniqueDeque/UniqueDeque+Initializers.swift index 714ec511..8f629921 100644 --- a/Sources/DequeModule/UniqueDeque/UniqueDeque+Initializers.swift +++ b/Sources/DequeModule/UniqueDeque/UniqueDeque+Initializers.swift @@ -69,7 +69,7 @@ extension UniqueDeque where Element: ~Copyable { @available(SwiftStdlib 5.0, *) extension UniqueDeque where Element: ~Copyable { -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && UnstableContainersPreview /// Creates a new unique deque of the specified capacity, populating it with /// all items generated by a given producer. /// @@ -92,7 +92,7 @@ extension UniqueDeque where Element: ~Copyable { } #endif -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && UnstableContainersPreview /// Creates a new unique deque, populating it with /// all items generated by a given producer. /// @@ -134,7 +134,7 @@ extension UniqueDeque /*where Element: Copyable*/ { @available(SwiftStdlib 5.0, *) extension UniqueDeque /*where Element: Copyable*/ { -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && UnstableContainersPreview /// Creates a new deque with the specified capacity, holding a copy /// of the contents of a given borrowing sequence. /// @@ -172,7 +172,7 @@ extension UniqueDeque /*where Element: Copyable*/ { self.append(copying: contents) } -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && UnstableContainersPreview /// 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 6ecc0136..433f4149 100644 --- a/Sources/DequeModule/UniqueDeque/UniqueDeque+Insertions.swift +++ b/Sources/DequeModule/UniqueDeque/UniqueDeque+Insertions.swift @@ -152,7 +152,7 @@ extension UniqueDeque where Element: ~Copyable { assert(remainder.isEmpty) } -#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if UnstableContainersPreview /// Moves the elements of an input span into this deque, /// starting at the specified position, and leaving the span empty. /// @@ -219,7 +219,7 @@ extension UniqueDeque where Element: ~Copyable { @available(SwiftStdlib 5.0, *) extension UniqueDeque where Element: ~Copyable { -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && UnstableContainersPreview /// Inserts at most `newItemCount` items generated by a producer into this /// deque, starting at the given index. /// @@ -373,7 +373,7 @@ extension UniqueDeque /* where Element: Copyable */ { } } -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && UnstableContainersPreview @inlinable internal mutating func _insertContainer< C: Container & ~Copyable & ~Escapable @@ -416,7 +416,7 @@ extension UniqueDeque /* where Element: Copyable */ { "Broken Collection: count doesn't match contents") } -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && UnstableContainersPreview /// Copies the elements of a container into this deque at the specified /// position. /// @@ -482,7 +482,7 @@ extension UniqueDeque /* where Element: Copyable */ { at: index, copying: items, newCount: items.count) } -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && UnstableContainersPreview /// 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 380082d7..598f0f0d 100644 --- a/Sources/DequeModule/UniqueDeque/UniqueDeque+Prepend.swift +++ b/Sources/DequeModule/UniqueDeque/UniqueDeque+Prepend.swift @@ -125,7 +125,7 @@ extension UniqueDeque where Element: ~Copyable { _storage._handle.uncheckedPrepend(moving: items) } -#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if UnstableContainersPreview /// Moves the elements of an input span by prepending them to the front of /// this deque, leaving the span empty. /// @@ -173,7 +173,7 @@ extension UniqueDeque where Element: ~Copyable { } } -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && UnstableContainersPreview /// Prepends at most `newItemCount` items generated by a producer to the front /// of this deque. /// @@ -220,7 +220,7 @@ extension UniqueDeque where Element: ~Copyable { } #endif -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && UnstableContainersPreview /// 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 @@ -319,7 +319,7 @@ extension UniqueDeque /*where Element: Copyable*/ { } } -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && UnstableContainersPreview @inlinable internal mutating func _prepend< S: BorrowingSequence_ & ~Copyable & ~Escapable @@ -466,7 +466,7 @@ extension UniqueDeque /*where Element: Copyable*/ { _storage._handle.uncheckedPrepend(copying: items, exactCount: c) } -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && UnstableContainersPreview /// 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 b7b5d42c..191e12cb 100644 --- a/Sources/DequeModule/UniqueDeque/UniqueDeque+Replacements.swift +++ b/Sources/DequeModule/UniqueDeque/UniqueDeque+Replacements.swift @@ -89,7 +89,7 @@ extension UniqueDeque where Element: ~Copyable { initializingWith: initializer) } -#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if UnstableContainersPreview /// Replaces the specified range of elements by a given count of new items, /// using callbacks to consume old items, and to then insert new ones. /// @@ -207,7 +207,7 @@ extension UniqueDeque where Element: ~Copyable { assert(remainder.isEmpty) } -#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if UnstableContainersPreview /// Replaces the specified range of elements by moving the contents of an /// input span into their place. On return, the span is left empty. /// @@ -287,7 +287,7 @@ extension UniqueDeque where Element: ~Copyable { } } -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && UnstableContainersPreview /// Replaces the specified range of elements by at most `newItemCount` items /// generated by a producer. /// @@ -464,7 +464,7 @@ extension UniqueDeque /* where Element: Copyable */ { } } -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && UnstableContainersPreview @inlinable internal mutating func _replace< C: Container & ~Copyable & ~Escapable @@ -511,7 +511,7 @@ extension UniqueDeque /* where Element: Copyable */ { "Broken Collection: count doesn't match contents") } -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && UnstableContainersPreview /// Replaces the specified subrange of elements by copying the elements of /// the given container. /// @@ -589,7 +589,7 @@ extension UniqueDeque /* where Element: Copyable */ { removing: subrange, copyingCollection: items, newCount: items.count) } -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && UnstableContainersPreview /// Replaces the specified subrange of elements by copying the elements of /// the given container. /// diff --git a/Sources/DequeModule/_UnsafeDequeHandle.swift b/Sources/DequeModule/_UnsafeDequeHandle.swift index 2db21307..3281eb17 100644 --- a/Sources/DequeModule/_UnsafeDequeHandle.swift +++ b/Sources/DequeModule/_UnsafeDequeHandle.swift @@ -1429,7 +1429,7 @@ extension _UnsafeDequeHandle where Element: ~Copyable { initializingWith: initializer) } -#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if UnstableContainersPreview @_alwaysEmitIntoClient internal mutating func uncheckedReplace( removing subrange: Range, diff --git a/Sources/InternalCollectionsUtilities/Span+Extras.swift b/Sources/InternalCollectionsUtilities/Span+Extras.swift index e23582ef..c10b26e8 100644 --- a/Sources/InternalCollectionsUtilities/Span+Extras.swift +++ b/Sources/InternalCollectionsUtilities/Span+Extras.swift @@ -38,7 +38,7 @@ extension Span where Element: ~Copyable { } } -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && UnstableContainersPreview @available(SwiftStdlib 5.0, *) extension Span where Element: Equatable & ~Copyable { @_alwaysEmitIntoClient diff --git a/Sources/SortedCollections/BTree/_BTree+BidirectionalCollection.swift b/Sources/SortedCollections/BTree/_BTree+BidirectionalCollection.swift index 00c37fa2..6eb5ea75 100644 --- a/Sources/SortedCollections/BTree/_BTree+BidirectionalCollection.swift +++ b/Sources/SortedCollections/BTree/_BTree+BidirectionalCollection.swift @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#if COLLECTIONS_UNSTABLE_SORTED_COLLECTIONS +#if UnstableSortedCollections // This contains `_BTree`'s general implementation of BidirectionalCollection. // These operations are bounds in contrast to most other methods on _BTree as diff --git a/Sources/SortedCollections/BTree/_BTree+CustomDebugStringConvertible.swift b/Sources/SortedCollections/BTree/_BTree+CustomDebugStringConvertible.swift index 1bff9052..a460556a 100644 --- a/Sources/SortedCollections/BTree/_BTree+CustomDebugStringConvertible.swift +++ b/Sources/SortedCollections/BTree/_BTree+CustomDebugStringConvertible.swift @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#if COLLECTIONS_UNSTABLE_SORTED_COLLECTIONS +#if UnstableSortedCollections extension _BTree: CustomDebugStringConvertible { #if DEBUG diff --git a/Sources/SortedCollections/BTree/_BTree+CustomReflectable.swift b/Sources/SortedCollections/BTree/_BTree+CustomReflectable.swift index 83d95cac..1cc01509 100644 --- a/Sources/SortedCollections/BTree/_BTree+CustomReflectable.swift +++ b/Sources/SortedCollections/BTree/_BTree+CustomReflectable.swift @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#if COLLECTIONS_UNSTABLE_SORTED_COLLECTIONS +#if UnstableSortedCollections #if !$Embedded extension _BTree: CustomReflectable { diff --git a/Sources/SortedCollections/BTree/_BTree+Invariants.swift b/Sources/SortedCollections/BTree/_BTree+Invariants.swift index 42c78e65..39471610 100644 --- a/Sources/SortedCollections/BTree/_BTree+Invariants.swift +++ b/Sources/SortedCollections/BTree/_BTree+Invariants.swift @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#if COLLECTIONS_UNSTABLE_SORTED_COLLECTIONS +#if UnstableSortedCollections extension _BTree { #if COLLECTIONS_INTERNAL_CHECKS diff --git a/Sources/SortedCollections/BTree/_BTree+Partial RangeReplaceableCollection.swift b/Sources/SortedCollections/BTree/_BTree+Partial RangeReplaceableCollection.swift index 994ae0aa..5a84fc47 100644 --- a/Sources/SortedCollections/BTree/_BTree+Partial RangeReplaceableCollection.swift +++ b/Sources/SortedCollections/BTree/_BTree+Partial RangeReplaceableCollection.swift @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#if COLLECTIONS_UNSTABLE_SORTED_COLLECTIONS +#if UnstableSortedCollections extension _BTree { /// Filters a B-Tree on a predicate, returning a new tree. diff --git a/Sources/SortedCollections/BTree/_BTree+Sequence.swift b/Sources/SortedCollections/BTree/_BTree+Sequence.swift index 6e4b05eb..f150c27d 100644 --- a/Sources/SortedCollections/BTree/_BTree+Sequence.swift +++ b/Sources/SortedCollections/BTree/_BTree+Sequence.swift @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#if COLLECTIONS_UNSTABLE_SORTED_COLLECTIONS +#if UnstableSortedCollections extension _BTree: Sequence { @inlinable diff --git a/Sources/SortedCollections/BTree/_BTree+SubSequence.swift b/Sources/SortedCollections/BTree/_BTree+SubSequence.swift index 8bb8c529..b7eba7de 100644 --- a/Sources/SortedCollections/BTree/_BTree+SubSequence.swift +++ b/Sources/SortedCollections/BTree/_BTree+SubSequence.swift @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#if COLLECTIONS_UNSTABLE_SORTED_COLLECTIONS +#if UnstableSortedCollections extension _BTree { @usableFromInline diff --git a/Sources/SortedCollections/BTree/_BTree+UnsafeCursor.swift b/Sources/SortedCollections/BTree/_BTree+UnsafeCursor.swift index d6b1542c..76b9c7c1 100644 --- a/Sources/SortedCollections/BTree/_BTree+UnsafeCursor.swift +++ b/Sources/SortedCollections/BTree/_BTree+UnsafeCursor.swift @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#if COLLECTIONS_UNSTABLE_SORTED_COLLECTIONS +#if UnstableSortedCollections extension _BTree { /// A mutable cursor to an element of the B-Tree represented as a path. diff --git a/Sources/SortedCollections/BTree/_BTree.Builder.swift b/Sources/SortedCollections/BTree/_BTree.Builder.swift index 3e9505ff..9b8e8d19 100644 --- a/Sources/SortedCollections/BTree/_BTree.Builder.swift +++ b/Sources/SortedCollections/BTree/_BTree.Builder.swift @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#if COLLECTIONS_UNSTABLE_SORTED_COLLECTIONS +#if UnstableSortedCollections extension _BTree { /// Provides an interface for efficiently constructing a filled B-Tree from sorted data. diff --git a/Sources/SortedCollections/BTree/_BTree.Index.swift b/Sources/SortedCollections/BTree/_BTree.Index.swift index 314e4067..344645b7 100644 --- a/Sources/SortedCollections/BTree/_BTree.Index.swift +++ b/Sources/SortedCollections/BTree/_BTree.Index.swift @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#if COLLECTIONS_UNSTABLE_SORTED_COLLECTIONS +#if UnstableSortedCollections extension _BTree { diff --git a/Sources/SortedCollections/BTree/_BTree.swift b/Sources/SortedCollections/BTree/_BTree.swift index 02328bcd..dcaa6749 100644 --- a/Sources/SortedCollections/BTree/_BTree.swift +++ b/Sources/SortedCollections/BTree/_BTree.swift @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#if COLLECTIONS_UNSTABLE_SORTED_COLLECTIONS +#if UnstableSortedCollections /// A bidirectional collection representing a BTree which efficiently stores its /// elements in sorted order and maintains roughly `O(log count)` diff --git a/Sources/SortedCollections/BTree/_FixedSizeArray.swift b/Sources/SortedCollections/BTree/_FixedSizeArray.swift index c8158bec..d85fa16e 100644 --- a/Sources/SortedCollections/BTree/_FixedSizeArray.swift +++ b/Sources/SortedCollections/BTree/_FixedSizeArray.swift @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#if COLLECTIONS_UNSTABLE_SORTED_COLLECTIONS +#if UnstableSortedCollections /// A stack-allocated deque of some values. /// diff --git a/Sources/SortedCollections/BTree/_Node+CustomDebugString.swift b/Sources/SortedCollections/BTree/_Node+CustomDebugString.swift index 2d1b3ceb..df09451d 100644 --- a/Sources/SortedCollections/BTree/_Node+CustomDebugString.swift +++ b/Sources/SortedCollections/BTree/_Node+CustomDebugString.swift @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#if COLLECTIONS_UNSTABLE_SORTED_COLLECTIONS +#if UnstableSortedCollections extension _Node: CustomDebugStringConvertible { /// A textual representation of this instance, suitable for debugging. diff --git a/Sources/SortedCollections/BTree/_Node+Testing.swift b/Sources/SortedCollections/BTree/_Node+Testing.swift index c7c20a6a..fa49e231 100644 --- a/Sources/SortedCollections/BTree/_Node+Testing.swift +++ b/Sources/SortedCollections/BTree/_Node+Testing.swift @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#if COLLECTIONS_UNSTABLE_SORTED_COLLECTIONS +#if UnstableSortedCollections extension _Node { /// Initialize a node from a list of key-value tuples. diff --git a/Sources/SortedCollections/BTree/_Node.Splinter.swift b/Sources/SortedCollections/BTree/_Node.Splinter.swift index 8f5e77d3..6f769f37 100644 --- a/Sources/SortedCollections/BTree/_Node.Splinter.swift +++ b/Sources/SortedCollections/BTree/_Node.Splinter.swift @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#if COLLECTIONS_UNSTABLE_SORTED_COLLECTIONS +#if UnstableSortedCollections extension _Node { /// Represents the result of a overfilled node's split. diff --git a/Sources/SortedCollections/BTree/_Node.Storage.swift b/Sources/SortedCollections/BTree/_Node.Storage.swift index c36937da..14dadf6d 100644 --- a/Sources/SortedCollections/BTree/_Node.Storage.swift +++ b/Sources/SortedCollections/BTree/_Node.Storage.swift @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#if COLLECTIONS_UNSTABLE_SORTED_COLLECTIONS +#if UnstableSortedCollections extension _Node { @usableFromInline diff --git a/Sources/SortedCollections/BTree/_Node.UnsafeHandle+CustomDebugStringConvertible.swift b/Sources/SortedCollections/BTree/_Node.UnsafeHandle+CustomDebugStringConvertible.swift index 2a821b72..ccd48d78 100644 --- a/Sources/SortedCollections/BTree/_Node.UnsafeHandle+CustomDebugStringConvertible.swift +++ b/Sources/SortedCollections/BTree/_Node.UnsafeHandle+CustomDebugStringConvertible.swift @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#if COLLECTIONS_UNSTABLE_SORTED_COLLECTIONS +#if UnstableSortedCollections #if !$Embedded // MARK: CustomDebugStringConvertible diff --git a/Sources/SortedCollections/BTree/_Node.UnsafeHandle+Deletion.swift b/Sources/SortedCollections/BTree/_Node.UnsafeHandle+Deletion.swift index 211d8496..9fcb7caa 100644 --- a/Sources/SortedCollections/BTree/_Node.UnsafeHandle+Deletion.swift +++ b/Sources/SortedCollections/BTree/_Node.UnsafeHandle+Deletion.swift @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#if COLLECTIONS_UNSTABLE_SORTED_COLLECTIONS +#if UnstableSortedCollections extension _Node.UnsafeHandle { /// Removes the key-value pair corresponding to the first found instance of the key. diff --git a/Sources/SortedCollections/BTree/_Node.UnsafeHandle+Insertion.swift b/Sources/SortedCollections/BTree/_Node.UnsafeHandle+Insertion.swift index 0f1b7c27..fcded870 100644 --- a/Sources/SortedCollections/BTree/_Node.UnsafeHandle+Insertion.swift +++ b/Sources/SortedCollections/BTree/_Node.UnsafeHandle+Insertion.swift @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#if COLLECTIONS_UNSTABLE_SORTED_COLLECTIONS +#if UnstableSortedCollections // MARK: Tree Insertions extension _Node.UnsafeHandle { diff --git a/Sources/SortedCollections/BTree/_Node.UnsafeHandle.swift b/Sources/SortedCollections/BTree/_Node.UnsafeHandle.swift index b5079570..9f52dfd1 100644 --- a/Sources/SortedCollections/BTree/_Node.UnsafeHandle.swift +++ b/Sources/SortedCollections/BTree/_Node.UnsafeHandle.swift @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#if COLLECTIONS_UNSTABLE_SORTED_COLLECTIONS +#if UnstableSortedCollections extension _Node { /// A handle allowing potentially mutable operations to be performed. diff --git a/Sources/SortedCollections/BTree/_Node.swift b/Sources/SortedCollections/BTree/_Node.swift index 9dc53861..4418ce51 100644 --- a/Sources/SortedCollections/BTree/_Node.swift +++ b/Sources/SortedCollections/BTree/_Node.swift @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#if COLLECTIONS_UNSTABLE_SORTED_COLLECTIONS +#if UnstableSortedCollections /// A single node within a B-Tree, containing keys, values, and children. /// diff --git a/Sources/SortedCollections/SortedDictionary/SortedDictionary+BidirectionalCollection.swift b/Sources/SortedCollections/SortedDictionary/SortedDictionary+BidirectionalCollection.swift index f7124a05..e42e8f70 100644 --- a/Sources/SortedCollections/SortedDictionary/SortedDictionary+BidirectionalCollection.swift +++ b/Sources/SortedCollections/SortedDictionary/SortedDictionary+BidirectionalCollection.swift @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#if COLLECTIONS_UNSTABLE_SORTED_COLLECTIONS +#if UnstableSortedCollections extension SortedDictionary: BidirectionalCollection { /// The number of elements in the sorted dictionary. diff --git a/Sources/SortedCollections/SortedDictionary/SortedDictionary+Codable.swift b/Sources/SortedCollections/SortedDictionary/SortedDictionary+Codable.swift index 058922a9..078e6e6f 100644 --- a/Sources/SortedCollections/SortedDictionary/SortedDictionary+Codable.swift +++ b/Sources/SortedCollections/SortedDictionary/SortedDictionary+Codable.swift @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#if COLLECTIONS_UNSTABLE_SORTED_COLLECTIONS +#if UnstableSortedCollections #if !$Embedded extension SortedDictionary: Encodable where Key: Codable, Value: Codable { diff --git a/Sources/SortedCollections/SortedDictionary/SortedDictionary+CustomReflectable.swift b/Sources/SortedCollections/SortedDictionary/SortedDictionary+CustomReflectable.swift index 4a707ca1..185e4691 100644 --- a/Sources/SortedCollections/SortedDictionary/SortedDictionary+CustomReflectable.swift +++ b/Sources/SortedCollections/SortedDictionary/SortedDictionary+CustomReflectable.swift @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#if COLLECTIONS_UNSTABLE_SORTED_COLLECTIONS +#if UnstableSortedCollections #if !$Embedded extension SortedDictionary: CustomReflectable { diff --git a/Sources/SortedCollections/SortedDictionary/SortedDictionary+CustomStringConvertible.swift b/Sources/SortedCollections/SortedDictionary/SortedDictionary+CustomStringConvertible.swift index 8952cf71..70f31210 100644 --- a/Sources/SortedCollections/SortedDictionary/SortedDictionary+CustomStringConvertible.swift +++ b/Sources/SortedCollections/SortedDictionary/SortedDictionary+CustomStringConvertible.swift @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#if COLLECTIONS_UNSTABLE_SORTED_COLLECTIONS +#if UnstableSortedCollections #if !$Embedded extension SortedDictionary: CustomStringConvertible, CustomDebugStringConvertible { diff --git a/Sources/SortedCollections/SortedDictionary/SortedDictionary+Equatable.swift b/Sources/SortedCollections/SortedDictionary/SortedDictionary+Equatable.swift index 128d20a4..4e9d6e24 100644 --- a/Sources/SortedCollections/SortedDictionary/SortedDictionary+Equatable.swift +++ b/Sources/SortedCollections/SortedDictionary/SortedDictionary+Equatable.swift @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#if COLLECTIONS_UNSTABLE_SORTED_COLLECTIONS +#if UnstableSortedCollections extension SortedDictionary: Equatable where Value: Equatable { /// Returns a Boolean value indicating whether two values are equal. diff --git a/Sources/SortedCollections/SortedDictionary/SortedDictionary+ExpressibleByDictionaryLiteral.swift b/Sources/SortedCollections/SortedDictionary/SortedDictionary+ExpressibleByDictionaryLiteral.swift index fb211da5..3a9f9c9c 100644 --- a/Sources/SortedCollections/SortedDictionary/SortedDictionary+ExpressibleByDictionaryLiteral.swift +++ b/Sources/SortedCollections/SortedDictionary/SortedDictionary+ExpressibleByDictionaryLiteral.swift @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#if COLLECTIONS_UNSTABLE_SORTED_COLLECTIONS +#if UnstableSortedCollections extension SortedDictionary: ExpressibleByDictionaryLiteral { /// Creates a new sorted dictionary from the contents of a dictionary diff --git a/Sources/SortedCollections/SortedDictionary/SortedDictionary+Hashable.swift b/Sources/SortedCollections/SortedDictionary/SortedDictionary+Hashable.swift index 66556c46..9d8cd64f 100644 --- a/Sources/SortedCollections/SortedDictionary/SortedDictionary+Hashable.swift +++ b/Sources/SortedCollections/SortedDictionary/SortedDictionary+Hashable.swift @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#if COLLECTIONS_UNSTABLE_SORTED_COLLECTIONS +#if UnstableSortedCollections extension SortedDictionary: Hashable where Key: Hashable, Value: Hashable { /// Hashes the essential components of this value by feeding them diff --git a/Sources/SortedCollections/SortedDictionary/SortedDictionary+Initializers.swift b/Sources/SortedCollections/SortedDictionary/SortedDictionary+Initializers.swift index dabdf73f..509523cc 100644 --- a/Sources/SortedCollections/SortedDictionary/SortedDictionary+Initializers.swift +++ b/Sources/SortedCollections/SortedDictionary/SortedDictionary+Initializers.swift @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#if COLLECTIONS_UNSTABLE_SORTED_COLLECTIONS +#if UnstableSortedCollections extension SortedDictionary { /// Creates a dictionary from a sequence of key-value pairs. diff --git a/Sources/SortedCollections/SortedDictionary/SortedDictionary+Keys.swift b/Sources/SortedCollections/SortedDictionary/SortedDictionary+Keys.swift index 612739c5..71dd4e5d 100644 --- a/Sources/SortedCollections/SortedDictionary/SortedDictionary+Keys.swift +++ b/Sources/SortedCollections/SortedDictionary/SortedDictionary+Keys.swift @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#if COLLECTIONS_UNSTABLE_SORTED_COLLECTIONS +#if UnstableSortedCollections extension SortedDictionary { /// A view of an sorted dictionary's Keys as a standalone collection. diff --git a/Sources/SortedCollections/SortedDictionary/SortedDictionary+Partial RangeReplaceableCollection.swift b/Sources/SortedCollections/SortedDictionary/SortedDictionary+Partial RangeReplaceableCollection.swift index 90d89db3..0581f60d 100644 --- a/Sources/SortedCollections/SortedDictionary/SortedDictionary+Partial RangeReplaceableCollection.swift +++ b/Sources/SortedCollections/SortedDictionary/SortedDictionary+Partial RangeReplaceableCollection.swift @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#if COLLECTIONS_UNSTABLE_SORTED_COLLECTIONS +#if UnstableSortedCollections extension SortedDictionary { /// Returns a new sorted dictionary containing the key-value pairs of the diff --git a/Sources/SortedCollections/SortedDictionary/SortedDictionary+Sendable.swift b/Sources/SortedCollections/SortedDictionary/SortedDictionary+Sendable.swift index ede91eb7..18ce1eb6 100644 --- a/Sources/SortedCollections/SortedDictionary/SortedDictionary+Sendable.swift +++ b/Sources/SortedCollections/SortedDictionary/SortedDictionary+Sendable.swift @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#if COLLECTIONS_UNSTABLE_SORTED_COLLECTIONS +#if UnstableSortedCollections extension SortedDictionary: @unchecked Sendable where Key: Sendable, Value: Sendable {} diff --git a/Sources/SortedCollections/SortedDictionary/SortedDictionary+Sequence.swift b/Sources/SortedCollections/SortedDictionary/SortedDictionary+Sequence.swift index 0a993ca4..53cdca75 100644 --- a/Sources/SortedCollections/SortedDictionary/SortedDictionary+Sequence.swift +++ b/Sources/SortedCollections/SortedDictionary/SortedDictionary+Sequence.swift @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#if COLLECTIONS_UNSTABLE_SORTED_COLLECTIONS +#if UnstableSortedCollections extension SortedDictionary: Sequence { @inlinable diff --git a/Sources/SortedCollections/SortedDictionary/SortedDictionary+SubSequence.swift b/Sources/SortedCollections/SortedDictionary/SortedDictionary+SubSequence.swift index fc1e6485..56880112 100644 --- a/Sources/SortedCollections/SortedDictionary/SortedDictionary+SubSequence.swift +++ b/Sources/SortedCollections/SortedDictionary/SortedDictionary+SubSequence.swift @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#if COLLECTIONS_UNSTABLE_SORTED_COLLECTIONS +#if UnstableSortedCollections extension SortedDictionary { public struct SubSequence { diff --git a/Sources/SortedCollections/SortedDictionary/SortedDictionary+Subscripts.swift b/Sources/SortedCollections/SortedDictionary/SortedDictionary+Subscripts.swift index 1223e00d..b7376c9f 100644 --- a/Sources/SortedCollections/SortedDictionary/SortedDictionary+Subscripts.swift +++ b/Sources/SortedCollections/SortedDictionary/SortedDictionary+Subscripts.swift @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#if COLLECTIONS_UNSTABLE_SORTED_COLLECTIONS +#if UnstableSortedCollections extension SortedDictionary { /// Accesses the value associated with the key for both read and write operations diff --git a/Sources/SortedCollections/SortedDictionary/SortedDictionary+Values.swift b/Sources/SortedCollections/SortedDictionary/SortedDictionary+Values.swift index d0baaba1..e75f3e44 100644 --- a/Sources/SortedCollections/SortedDictionary/SortedDictionary+Values.swift +++ b/Sources/SortedCollections/SortedDictionary/SortedDictionary+Values.swift @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#if COLLECTIONS_UNSTABLE_SORTED_COLLECTIONS +#if UnstableSortedCollections extension SortedDictionary { /// A view of an sorted dictionary's values as a standalone collection. diff --git a/Sources/SortedCollections/SortedDictionary/SortedDictionary.Index.swift b/Sources/SortedCollections/SortedDictionary/SortedDictionary.Index.swift index bd759efb..541fa5a9 100644 --- a/Sources/SortedCollections/SortedDictionary/SortedDictionary.Index.swift +++ b/Sources/SortedCollections/SortedDictionary/SortedDictionary.Index.swift @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#if COLLECTIONS_UNSTABLE_SORTED_COLLECTIONS +#if UnstableSortedCollections extension SortedDictionary { /// Returns the index for a given key, if it exists diff --git a/Sources/SortedCollections/SortedDictionary/SortedDictionary.swift b/Sources/SortedCollections/SortedDictionary/SortedDictionary.swift index f6a077ae..1d64de83 100644 --- a/Sources/SortedCollections/SortedDictionary/SortedDictionary.swift +++ b/Sources/SortedCollections/SortedDictionary/SortedDictionary.swift @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#if COLLECTIONS_UNSTABLE_SORTED_COLLECTIONS +#if UnstableSortedCollections /// A collection which maintains key-value pairs in ascending sorted order. /// diff --git a/Sources/SortedCollections/SortedSet/SortedSet+BidirectionalCollection.swift b/Sources/SortedCollections/SortedSet/SortedSet+BidirectionalCollection.swift index 3403a1bd..19a21cd3 100644 --- a/Sources/SortedCollections/SortedSet/SortedSet+BidirectionalCollection.swift +++ b/Sources/SortedCollections/SortedSet/SortedSet+BidirectionalCollection.swift @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#if COLLECTIONS_UNSTABLE_SORTED_COLLECTIONS +#if UnstableSortedCollections extension SortedSet: BidirectionalCollection { /// The number of elements in the sorted set. diff --git a/Sources/SortedCollections/SortedSet/SortedSet+Codable.swift b/Sources/SortedCollections/SortedSet/SortedSet+Codable.swift index ac8ebbc1..a7d8d825 100644 --- a/Sources/SortedCollections/SortedSet/SortedSet+Codable.swift +++ b/Sources/SortedCollections/SortedSet/SortedSet+Codable.swift @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#if COLLECTIONS_UNSTABLE_SORTED_COLLECTIONS +#if UnstableSortedCollections #if !$Embedded extension SortedSet: Encodable where Element: Encodable { diff --git a/Sources/SortedCollections/SortedSet/SortedSet+CustomReflectable.swift b/Sources/SortedCollections/SortedSet/SortedSet+CustomReflectable.swift index 43f80fd5..149cd21b 100644 --- a/Sources/SortedCollections/SortedSet/SortedSet+CustomReflectable.swift +++ b/Sources/SortedCollections/SortedSet/SortedSet+CustomReflectable.swift @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#if COLLECTIONS_UNSTABLE_SORTED_COLLECTIONS +#if UnstableSortedCollections #if !$Embedded extension SortedSet: CustomReflectable { diff --git a/Sources/SortedCollections/SortedSet/SortedSet+CustomStringConvertible.swift b/Sources/SortedCollections/SortedSet/SortedSet+CustomStringConvertible.swift index c08fa88f..6d664c1a 100644 --- a/Sources/SortedCollections/SortedSet/SortedSet+CustomStringConvertible.swift +++ b/Sources/SortedCollections/SortedSet/SortedSet+CustomStringConvertible.swift @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#if COLLECTIONS_UNSTABLE_SORTED_COLLECTIONS +#if UnstableSortedCollections #if !$Embedded extension SortedSet: CustomStringConvertible, CustomDebugStringConvertible { diff --git a/Sources/SortedCollections/SortedSet/SortedSet+Equatable.swift b/Sources/SortedCollections/SortedSet/SortedSet+Equatable.swift index e43a0a3b..2a56d3a7 100644 --- a/Sources/SortedCollections/SortedSet/SortedSet+Equatable.swift +++ b/Sources/SortedCollections/SortedSet/SortedSet+Equatable.swift @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#if COLLECTIONS_UNSTABLE_SORTED_COLLECTIONS +#if UnstableSortedCollections extension SortedSet: Equatable { /// Returns a Boolean value indicating whether two values are equal. diff --git a/Sources/SortedCollections/SortedSet/SortedSet+ExpressibleByArrayLiteral.swift b/Sources/SortedCollections/SortedSet/SortedSet+ExpressibleByArrayLiteral.swift index f231b42a..b920f3c7 100644 --- a/Sources/SortedCollections/SortedSet/SortedSet+ExpressibleByArrayLiteral.swift +++ b/Sources/SortedCollections/SortedSet/SortedSet+ExpressibleByArrayLiteral.swift @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#if COLLECTIONS_UNSTABLE_SORTED_COLLECTIONS +#if UnstableSortedCollections extension SortedSet: ExpressibleByArrayLiteral { /// Creates a new sorted set from the contents of an array literal. diff --git a/Sources/SortedCollections/SortedSet/SortedSet+Hashable.swift b/Sources/SortedCollections/SortedSet/SortedSet+Hashable.swift index 3d07b58d..95e5fb32 100644 --- a/Sources/SortedCollections/SortedSet/SortedSet+Hashable.swift +++ b/Sources/SortedCollections/SortedSet/SortedSet+Hashable.swift @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#if COLLECTIONS_UNSTABLE_SORTED_COLLECTIONS +#if UnstableSortedCollections extension SortedSet: Hashable where Element: Hashable { /// Hashes the essential components of this value by feeding them diff --git a/Sources/SortedCollections/SortedSet/SortedSet+Initializers.swift b/Sources/SortedCollections/SortedSet/SortedSet+Initializers.swift index 831f4398..dd69d28d 100644 --- a/Sources/SortedCollections/SortedSet/SortedSet+Initializers.swift +++ b/Sources/SortedCollections/SortedSet/SortedSet+Initializers.swift @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#if COLLECTIONS_UNSTABLE_SORTED_COLLECTIONS +#if UnstableSortedCollections extension SortedSet { /// Creates a new set from a finite sequence of items. diff --git a/Sources/SortedCollections/SortedSet/SortedSet+Partial RangeReplaceableCollection.swift b/Sources/SortedCollections/SortedSet/SortedSet+Partial RangeReplaceableCollection.swift index 2f22f25c..962c08b5 100644 --- a/Sources/SortedCollections/SortedSet/SortedSet+Partial RangeReplaceableCollection.swift +++ b/Sources/SortedCollections/SortedSet/SortedSet+Partial RangeReplaceableCollection.swift @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#if COLLECTIONS_UNSTABLE_SORTED_COLLECTIONS +#if UnstableSortedCollections extension SortedSet { /// Returns a new sorted set containing the members of the set that satisfy the given diff --git a/Sources/SortedCollections/SortedSet/SortedSet+Sendable.swift b/Sources/SortedCollections/SortedSet/SortedSet+Sendable.swift index ec2f90c0..e172f0d4 100644 --- a/Sources/SortedCollections/SortedSet/SortedSet+Sendable.swift +++ b/Sources/SortedCollections/SortedSet/SortedSet+Sendable.swift @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#if COLLECTIONS_UNSTABLE_SORTED_COLLECTIONS +#if UnstableSortedCollections extension SortedSet: @unchecked Sendable where Element: Sendable {} diff --git a/Sources/SortedCollections/SortedSet/SortedSet+Sequence.swift b/Sources/SortedCollections/SortedSet/SortedSet+Sequence.swift index 3db88fd3..5dfb84e4 100644 --- a/Sources/SortedCollections/SortedSet/SortedSet+Sequence.swift +++ b/Sources/SortedCollections/SortedSet/SortedSet+Sequence.swift @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#if COLLECTIONS_UNSTABLE_SORTED_COLLECTIONS +#if UnstableSortedCollections extension SortedSet: Sequence { @inlinable diff --git a/Sources/SortedCollections/SortedSet/SortedSet+SetAlgebra.swift b/Sources/SortedCollections/SortedSet/SortedSet+SetAlgebra.swift index d6a03973..c49b4b01 100644 --- a/Sources/SortedCollections/SortedSet/SortedSet+SetAlgebra.swift +++ b/Sources/SortedCollections/SortedSet/SortedSet+SetAlgebra.swift @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#if COLLECTIONS_UNSTABLE_SORTED_COLLECTIONS +#if UnstableSortedCollections extension SortedSet: SetAlgebra { diff --git a/Sources/SortedCollections/SortedSet/SortedSet+SubSequence.swift b/Sources/SortedCollections/SortedSet/SortedSet+SubSequence.swift index 7232d27b..8120385a 100644 --- a/Sources/SortedCollections/SortedSet/SortedSet+SubSequence.swift +++ b/Sources/SortedCollections/SortedSet/SortedSet+SubSequence.swift @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#if COLLECTIONS_UNSTABLE_SORTED_COLLECTIONS +#if UnstableSortedCollections extension SortedSet { public struct SubSequence { diff --git a/Sources/SortedCollections/SortedSet/SortedSet+Subscripts.swift b/Sources/SortedCollections/SortedSet/SortedSet+Subscripts.swift index 90c91e32..ec235733 100644 --- a/Sources/SortedCollections/SortedSet/SortedSet+Subscripts.swift +++ b/Sources/SortedCollections/SortedSet/SortedSet+Subscripts.swift @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#if COLLECTIONS_UNSTABLE_SORTED_COLLECTIONS +#if UnstableSortedCollections extension SortedSet { @inlinable diff --git a/Sources/SortedCollections/SortedSet/SortedSet.Index.swift b/Sources/SortedCollections/SortedSet/SortedSet.Index.swift index 61f72658..0885b517 100644 --- a/Sources/SortedCollections/SortedSet/SortedSet.Index.swift +++ b/Sources/SortedCollections/SortedSet/SortedSet.Index.swift @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#if COLLECTIONS_UNSTABLE_SORTED_COLLECTIONS +#if UnstableSortedCollections extension SortedSet { /// Returns the index for a given element, if it exists diff --git a/Sources/SortedCollections/SortedSet/SortedSet.swift b/Sources/SortedCollections/SortedSet/SortedSet.swift index daebfa7b..bd04f0a7 100644 --- a/Sources/SortedCollections/SortedSet/SortedSet.swift +++ b/Sources/SortedCollections/SortedSet/SortedSet.swift @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#if COLLECTIONS_UNSTABLE_SORTED_COLLECTIONS +#if UnstableSortedCollections /// A collection which maintains unique members in ascending sorted order. public struct SortedSet { diff --git a/Tests/BasicContainersTests/ArrayLayout.swift b/Tests/BasicContainersTests/ArrayLayout.swift index da10e368..14e483cf 100644 --- a/Tests/BasicContainersTests/ArrayLayout.swift +++ b/Tests/BasicContainersTests/ArrayLayout.swift @@ -108,7 +108,7 @@ extension LifetimeTracker { return UniqueArray(consuming: contents) } -#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if UnstableContainersPreview func withInputSpan( layout: ArrayLayout, using generator: (Int) -> Element, diff --git a/Tests/BasicContainersTests/RigidArrayTests.swift b/Tests/BasicContainersTests/RigidArrayTests.swift index a10d626a..f0946309 100644 --- a/Tests/BasicContainersTests/RigidArrayTests.swift +++ b/Tests/BasicContainersTests/RigidArrayTests.swift @@ -73,7 +73,7 @@ class RigidArrayTests: CollectionTestCase { let expected = (0 ..< layout.count).map { tracker.instance(for: $0) } expectEqual(tracker.instances, 2 * layout.count) expectRigidArrayContents(items, equalTo: expected) -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && UnstableContainersPreview checkIterable(items, expectedContents: expected) #endif } @@ -163,7 +163,7 @@ class RigidArrayTests: CollectionTestCase { } } -#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if UnstableContainersPreview #if false // FIXME: Update func test_init_copying_Container() { withSomeArrayLayouts("layout", ofCapacities: [0, 10, 100]) { layout in @@ -828,7 +828,7 @@ class RigidArrayTests: CollectionTestCase { } } -#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if UnstableContainersPreview func test_append_moving_InputSpan() { withSomeArrayLayouts("layout", ofCapacities: [0, 1, 5, 10]) { layout in withSomeArrayLayouts("spanLayout", ofCapacities: 0 ..< layout.freeCapacity) { spanLayout in @@ -913,7 +913,7 @@ class RigidArrayTests: CollectionTestCase { } } -#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if UnstableContainersPreview #if false // FIXME: Update func test_append_copying_Container() { withSomeArrayLayouts("layout", ofCapacities: [0, 10, 100]) { layout in @@ -1059,7 +1059,7 @@ class RigidArrayTests: CollectionTestCase { } } -#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if UnstableContainersPreview func test_insert_moving_InputSpan() { withSomeArrayLayouts("layout", ofCapacities: [0, 1, 5, 10]) { layout in withSomeArrayLayouts("spanLayout", ofCapacities: 0 ..< layout.freeCapacity) { spanLayout in @@ -1177,7 +1177,7 @@ class RigidArrayTests: CollectionTestCase { } } -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && UnstableContainersPreview func test_insert_copying_Container() { withSomeArrayLayouts("layout", ofCapacities: [0, 5, 10]) { layout in withEvery("i", in: 0 ... layout.count) { i in @@ -1272,7 +1272,7 @@ class RigidArrayTests: CollectionTestCase { } } -#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if UnstableContainersPreview func test_replace_consuming_full() { withSomeArrayLayouts("layout", ofCapacities: [0, 5, 10]) { layout in withEveryRange("subrange", in: 0 ..< layout.count) { subrange in @@ -1409,7 +1409,7 @@ class RigidArrayTests: CollectionTestCase { } } -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && UnstableContainersPreview func test_replace_Container() { withSomeArrayLayouts("layout", ofCapacities: [0, 5, 10]) { layout in withEveryRange("range", in: 0 ..< layout.count) { range in @@ -1440,7 +1440,7 @@ class RigidArrayTests: CollectionTestCase { } #endif -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && UnstableContainersPreview func test_borrowing_map() { let c = 100 let items = RigidArray(capacity: c, copying: 0 ..< c) @@ -1468,7 +1468,7 @@ class RigidArrayTests: CollectionTestCase { } #endif -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && UnstableContainersPreview func test_consume_subrange_drainNext() { withLifetimeTracking { tracker in var a = RigidArray>(capacity: 4) diff --git a/Tests/BasicContainersTests/RigidDictionaryTests.swift b/Tests/BasicContainersTests/RigidDictionaryTests.swift index d4ad95bb..3785a138 100644 --- a/Tests/BasicContainersTests/RigidDictionaryTests.swift +++ b/Tests/BasicContainersTests/RigidDictionaryTests.swift @@ -20,7 +20,7 @@ import BasicContainers import ContainersPreview #endif -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_HASHED_CONTAINERS +#if compiler(>=6.4) && UnstableHashedContainers class RigidDictionaryTests: CollectionTestCase { func test_empty() { @@ -58,7 +58,7 @@ class RigidDictionaryTests: CollectionTestCase { d.insertValue(secondValue, forKey: secondKey), secondValue) -#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if UnstableContainersPreview let thirdKey = tracker.instance(for: 42) expectNotNil(d.value(forKey: thirdKey)) { valueRef in expectIdentical(valueRef.value, firstValue) @@ -91,7 +91,7 @@ class RigidDictionaryTests: CollectionTestCase { let res = d.updateValue(secondValue, forKey: secondKey) expectIdentical(res, firstValue) -#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if UnstableContainersPreview let thirdKey = tracker.instance(for: 42) expectNotNil(d.value(forKey: thirdKey)) { valueRef in expectIdentical(valueRef.value, secondValue) @@ -140,7 +140,7 @@ class RigidDictionaryTests: CollectionTestCase { expectEqual(d.capacity, capacity) expectEqual(d.freeCapacity, 0) -#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if UnstableContainersPreview for i in 0 ..< capacity { let dupe = tracker.instance(for: i) expectNotNil( @@ -188,7 +188,7 @@ class RigidDictionaryTests: CollectionTestCase { expectEqual(d.capacity, capacity) expectEqual(d.freeCapacity, 0) -#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if UnstableContainersPreview for i in 0 ..< capacity { let dupe = tracker.instance(for: i) expectNotNil( @@ -203,7 +203,7 @@ class RigidDictionaryTests: CollectionTestCase { } } -#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if UnstableContainersPreview func test_memoizedValue_one() { typealias Key = LifetimeTracked typealias Value = LifetimeTracked @@ -257,7 +257,7 @@ class RigidDictionaryTests: CollectionTestCase { d.withKeys { keys in expectEqual(keys.count, i + 1) expectEqual(keys.capacity, capacity) -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && UnstableContainersPreview var it = keys.makeBorrowingIterator_() var actual: Set = [] while true { @@ -308,7 +308,7 @@ class RigidDictionaryTests: CollectionTestCase { } } -#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if UnstableContainersPreview @available(SwiftStdlib 6.2, *) func test_iteration_indices() { typealias Key = LifetimeTracked diff --git a/Tests/BasicContainersTests/RigidSetTests.swift b/Tests/BasicContainersTests/RigidSetTests.swift index 90de1c3c..c040ad6c 100644 --- a/Tests/BasicContainersTests/RigidSetTests.swift +++ b/Tests/BasicContainersTests/RigidSetTests.swift @@ -19,7 +19,7 @@ import _CollectionsTestSupport import BasicContainers #endif -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_HASHED_CONTAINERS +#if compiler(>=6.4) && UnstableHashedContainers fileprivate struct Pair: Hashable { var first: Int @@ -291,7 +291,7 @@ class RigidSetTests: CollectionTestCase { expectConsistentSet(set) } -#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if UnstableContainersPreview func test_borrowing_iterator() { withEvery("capacity", in: [0, 1, 2, 3, 4, 10, 100, 1000]) { capacity in withEvery("maximumCount", in: [1, 2, 3, Int.max]) { maximumCount in @@ -356,7 +356,7 @@ class RigidSetTests: CollectionTestCase { } } -#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if UnstableContainersPreview func test_insert_producer() { withEvery("capacity", in: [0, 1, 2, 4, 10, 100, 200]) { capacity in withEvery("count", in: 0 ..< capacity) { count in @@ -393,7 +393,7 @@ class RigidSetTests: CollectionTestCase { } #endif -#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if UnstableContainersPreview func test_insert_drain() { withEvery("capacity", in: [0, 1, 2, 4, 10, 100, 200]) { capacity in withEvery("count", in: 0 ..< capacity) { count in diff --git a/Tests/BasicContainersTests/UniqueArrayTests.swift b/Tests/BasicContainersTests/UniqueArrayTests.swift index f9b08887..cc756283 100644 --- a/Tests/BasicContainersTests/UniqueArrayTests.swift +++ b/Tests/BasicContainersTests/UniqueArrayTests.swift @@ -75,7 +75,7 @@ class UniqueArrayTests: CollectionTestCase { let expected = (0 ..< layout.count).map { tracker.instance(for: $0) } expectEqual(tracker.instances, 2 * layout.count) expectUniqueArrayContents(items, equalTo: expected) -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && UnstableContainersPreview checkIterable(items, expectedContents: expected) #endif } @@ -196,7 +196,7 @@ class UniqueArrayTests: CollectionTestCase { } } -#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if UnstableContainersPreview #if false // FIXME: Update func test_init_copying_Container() { withSomeArrayLayouts("layout", ofCapacities: [0, 10, 100]) { layout in @@ -745,7 +745,7 @@ class UniqueArrayTests: CollectionTestCase { } } -#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if UnstableContainersPreview #if false // FIXME: Update func test_append_copying_Container() { withSomeArrayLayouts("layout", ofCapacities: [0, 10, 100]) { layout in @@ -851,7 +851,7 @@ class UniqueArrayTests: CollectionTestCase { } } -#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if UnstableContainersPreview #if false // FIXME: Update func test_insert_copying_Container() { withSomeArrayLayouts("layout", ofCapacities: [0, 10, 100]) { layout in @@ -985,7 +985,7 @@ class UniqueArrayTests: CollectionTestCase { } } -#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if UnstableContainersPreview #if false // FIXME: Update func test_replace_copying_Container() { withSomeArrayLayouts("layout", ofCapacities: [0, 5, 10]) { layout in diff --git a/Tests/BasicContainersTests/UniqueDictionaryTests.swift b/Tests/BasicContainersTests/UniqueDictionaryTests.swift index 70afa677..f9d0f464 100644 --- a/Tests/BasicContainersTests/UniqueDictionaryTests.swift +++ b/Tests/BasicContainersTests/UniqueDictionaryTests.swift @@ -20,7 +20,7 @@ import BasicContainers import ContainersPreview #endif -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_HASHED_CONTAINERS +#if compiler(>=6.4) && UnstableHashedContainers class UniqueDictionaryTests: CollectionTestCase { func test_empty() { @@ -145,7 +145,7 @@ class UniqueDictionaryTests: CollectionTestCase { d.withKeys { keys in expectEqual(keys.count, i + 1) expectEqual(keys.capacity, capacity) -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && UnstableContainersPreview var it = keys.makeBorrowingIterator_() var actual: Set = [] while true { @@ -195,7 +195,7 @@ class UniqueDictionaryTests: CollectionTestCase { } } -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && UnstableContainersPreview @available(SwiftStdlib 6.2, *) func test_iteration_indices() { typealias Key = LifetimeTracked diff --git a/Tests/BasicContainersTests/UniqueSetTests.swift b/Tests/BasicContainersTests/UniqueSetTests.swift index 2591a10e..f169c258 100644 --- a/Tests/BasicContainersTests/UniqueSetTests.swift +++ b/Tests/BasicContainersTests/UniqueSetTests.swift @@ -19,7 +19,7 @@ import _CollectionsTestSupport import BasicContainers #endif -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_HASHED_CONTAINERS +#if compiler(>=6.4) && UnstableHashedContainers class UniqueSetTests: CollectionTestCase { func test_empty() { let s = UniqueSet() diff --git a/Tests/ContainersTests/BorrowingSequenceTests.swift b/Tests/ContainersTests/BorrowingSequenceTests.swift index ee11b268..781d5211 100644 --- a/Tests/ContainersTests/BorrowingSequenceTests.swift +++ b/Tests/ContainersTests/BorrowingSequenceTests.swift @@ -20,7 +20,7 @@ import _CollectionsTestSupport import ContainersPreview #endif -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && UnstableContainersPreview final class BorrowingSequenceTests: XCTestCase { @available(SwiftStdlib 6.2, *) func testBasic() { diff --git a/Tests/ContainersTests/InoutTests.swift b/Tests/ContainersTests/InoutTests.swift index 0108f015..5a0fb7c7 100644 --- a/Tests/ContainersTests/InoutTests.swift +++ b/Tests/ContainersTests/InoutTests.swift @@ -19,7 +19,7 @@ import _CollectionsTestSupport import ContainersPreview #endif -#if compiler(>=6.3) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.3) && UnstableContainersPreview final class InoutTests: XCTestCase { func test_basic() { var x = 0 diff --git a/Tests/ContainersTests/UniqueBoxTests.swift b/Tests/ContainersTests/UniqueBoxTests.swift index 6f42c84d..0ef8d83d 100644 --- a/Tests/ContainersTests/UniqueBoxTests.swift +++ b/Tests/ContainersTests/UniqueBoxTests.swift @@ -230,7 +230,7 @@ final class UniqueBoxTests: CollectionTestCase { // MARK: Preview-gated API -#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if UnstableContainersPreview @available(SwiftStdlib 5.0, *) func test_borrow_read() { let box = UniqueBox(123) @@ -246,7 +246,7 @@ final class UniqueBoxTests: CollectionTestCase { } #endif -#if compiler(>=6.3) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.3) && UnstableContainersPreview func test_mutate_read() { var box = UniqueBox(10) let ref = box.mutate() diff --git a/Tests/DequeTests/RigidDequeTests.swift b/Tests/DequeTests/RigidDequeTests.swift index 34d19082..3e533725 100644 --- a/Tests/DequeTests/RigidDequeTests.swift +++ b/Tests/DequeTests/RigidDequeTests.swift @@ -81,7 +81,7 @@ internal func expectRigidDequeContents< file: StaticString = #filePath, line: UInt = #line ) { -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && UnstableContainersPreview expectIterableContents( left, equivalentTo: right, @@ -354,7 +354,7 @@ final class RigidDequeTests: CollectionTestCase { } } -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && UnstableContainersPreview func test_initFromProducer() { withEvery("count", in: 0 ..< 10) { count in withEvery("capacity", in: [count, count + 1, 2 * count] as Set) { capacity in @@ -423,7 +423,7 @@ final class RigidDequeTests: CollectionTestCase { } } -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && UnstableContainersPreview func test_initCopyingBorrowingSequence() { withEvery("c", in: 0 ..< 10) { c in withEvery("capacity", in: [c, c + 1]) { capacity in @@ -776,7 +776,7 @@ final class RigidDequeTests: CollectionTestCase { } } -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && UnstableContainersPreview func test_prepend_Producer_full() { withEveryDeque("layout", ofCapacities: [0, 1, 2, 3, 5]) { layout in withEvery("producerSize", in: 0 ..< 6) { producerSize in @@ -801,7 +801,7 @@ final class RigidDequeTests: CollectionTestCase { } #endif -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && UnstableContainersPreview func test_append_Producer() { withEveryDeque("layout", ofCapacities: [0, 1, 2, 3, 5]) { layout in withEvery("producerSize", in: 0 ..< layout.freeCapacity) { producerSize in @@ -826,7 +826,7 @@ final class RigidDequeTests: CollectionTestCase { } #endif -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && UnstableContainersPreview func test_prepend_Producer_failing() { withEveryDeque("layout", ofCapacities: [0, 1, 2, 3, 5]) { layout in guard layout.freeCapacity > 0 else { return } @@ -857,7 +857,7 @@ final class RigidDequeTests: CollectionTestCase { } #endif -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && UnstableContainersPreview func test_append_Producer_failing() { withEveryDeque("layout", ofCapacities: [0, 1, 2, 3, 5]) { layout in guard layout.freeCapacity > 0 else { return } @@ -1183,7 +1183,7 @@ final class RigidDequeTests: CollectionTestCase { } } -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && UnstableContainersPreview func test_insert_fromProducer() { withEveryDeque("layout", ofCapacities: [0, 1, 2, 3, 5]) { layout in withEvery("i", in: 0 ... layout.count) { i in @@ -1215,7 +1215,7 @@ final class RigidDequeTests: CollectionTestCase { } #endif -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && UnstableContainersPreview func test_insert_fromProducer_failing() { withEveryDeque("layout", ofCapacities: [0, 1, 2, 3, 5]) { layout in guard layout.freeCapacity > 0 else { return } @@ -1273,7 +1273,7 @@ final class RigidDequeTests: CollectionTestCase { } } -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && UnstableContainersPreview func test_insert_RigidArray() { withEveryDeque("layout", ofCapacities: [0, 1, 2, 3, 5, 10]) { layout in withEvery("i", in: 0 ... layout.count) { i in @@ -1361,7 +1361,7 @@ final class RigidDequeTests: CollectionTestCase { } } -#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if UnstableContainersPreview func test_replace_consuming_addingCount_full() { withEveryDeque("layout", ofCapacities: [0, 5, 10]) { layout in withEveryRange("subrange", in: 0 ..< layout.count) { subrange in @@ -1407,7 +1407,7 @@ final class RigidDequeTests: CollectionTestCase { } #endif -#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if UnstableContainersPreview func test_replace_consuming_addingCount_partial() { withEveryDeque("layout", ofCapacities: [0, 5, 10]) { layout in withEveryRange("subrange", in: 0 ..< layout.count) { subrange in @@ -1554,7 +1554,7 @@ final class RigidDequeTests: CollectionTestCase { } } -#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if UnstableContainersPreview func test_consume_subrange() { withEveryDeque("layout", ofCapacities: [0, 1, 2, 3, 5, 10]) { layout in withEvery("from", in: 0 ... layout.count) { from in diff --git a/Tests/DequeTests/UniqueDequeTests.swift b/Tests/DequeTests/UniqueDequeTests.swift index be94e97d..08774ba3 100644 --- a/Tests/DequeTests/UniqueDequeTests.swift +++ b/Tests/DequeTests/UniqueDequeTests.swift @@ -81,7 +81,7 @@ internal func expectUniqueDequeContents< file: StaticString = #filePath, line: UInt = #line ) { -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && UnstableContainersPreview expectIterableContents( left, equivalentTo: right, diff --git a/Tests/SortedCollectionsTests/BTree/BTree Tests.swift b/Tests/SortedCollectionsTests/BTree/BTree Tests.swift index f9dc37e7..4b2422df 100644 --- a/Tests/SortedCollectionsTests/BTree/BTree Tests.swift +++ b/Tests/SortedCollectionsTests/BTree/BTree Tests.swift @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#if COLLECTIONS_UNSTABLE_SORTED_COLLECTIONS +#if UnstableSortedCollections #if DEBUG import _CollectionsTestSupport diff --git a/Tests/SortedCollectionsTests/BTree/BTree+Deletion Tests.swift b/Tests/SortedCollectionsTests/BTree/BTree+Deletion Tests.swift index 8cbfddfb..9c24e764 100644 --- a/Tests/SortedCollectionsTests/BTree/BTree+Deletion Tests.swift +++ b/Tests/SortedCollectionsTests/BTree/BTree+Deletion Tests.swift @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#if COLLECTIONS_UNSTABLE_SORTED_COLLECTIONS +#if UnstableSortedCollections #if DEBUG import _CollectionsTestSupport diff --git a/Tests/SortedCollectionsTests/BTree/BTree.Builder Tests.swift b/Tests/SortedCollectionsTests/BTree/BTree.Builder Tests.swift index 27938fcc..83120478 100644 --- a/Tests/SortedCollectionsTests/BTree/BTree.Builder Tests.swift +++ b/Tests/SortedCollectionsTests/BTree/BTree.Builder Tests.swift @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#if COLLECTIONS_UNSTABLE_SORTED_COLLECTIONS +#if UnstableSortedCollections #if DEBUG import _CollectionsTestSupport diff --git a/Tests/SortedCollectionsTests/BTree/Node Utils.swift b/Tests/SortedCollectionsTests/BTree/Node Utils.swift index 603e35d1..2d52d920 100644 --- a/Tests/SortedCollectionsTests/BTree/Node Utils.swift +++ b/Tests/SortedCollectionsTests/BTree/Node Utils.swift @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#if COLLECTIONS_UNSTABLE_SORTED_COLLECTIONS +#if UnstableSortedCollections #if DEBUG import _CollectionsTestSupport diff --git a/Tests/SortedCollectionsTests/BTree/Node+Balancing Tests.swift b/Tests/SortedCollectionsTests/BTree/Node+Balancing Tests.swift index c7c36ab2..0aaf9b93 100644 --- a/Tests/SortedCollectionsTests/BTree/Node+Balancing Tests.swift +++ b/Tests/SortedCollectionsTests/BTree/Node+Balancing Tests.swift @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#if COLLECTIONS_UNSTABLE_SORTED_COLLECTIONS +#if UnstableSortedCollections #if DEBUG import _CollectionsTestSupport diff --git a/Tests/SortedCollectionsTests/BTree/Node+Insertion Tests.swift b/Tests/SortedCollectionsTests/BTree/Node+Insertion Tests.swift index e9ab6746..14b50366 100644 --- a/Tests/SortedCollectionsTests/BTree/Node+Insertion Tests.swift +++ b/Tests/SortedCollectionsTests/BTree/Node+Insertion Tests.swift @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#if COLLECTIONS_UNSTABLE_SORTED_COLLECTIONS +#if UnstableSortedCollections #if DEBUG import _CollectionsTestSupport diff --git a/Tests/SortedCollectionsTests/BTree/Node+Join Tests.swift b/Tests/SortedCollectionsTests/BTree/Node+Join Tests.swift index c74f3aab..8ece8581 100644 --- a/Tests/SortedCollectionsTests/BTree/Node+Join Tests.swift +++ b/Tests/SortedCollectionsTests/BTree/Node+Join Tests.swift @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#if COLLECTIONS_UNSTABLE_SORTED_COLLECTIONS +#if UnstableSortedCollections #if DEBUG import _CollectionsTestSupport diff --git a/Tests/SortedCollectionsTests/BTree/NodeTests.swift b/Tests/SortedCollectionsTests/BTree/NodeTests.swift index 95f8a069..af15e850 100644 --- a/Tests/SortedCollectionsTests/BTree/NodeTests.swift +++ b/Tests/SortedCollectionsTests/BTree/NodeTests.swift @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#if COLLECTIONS_UNSTABLE_SORTED_COLLECTIONS +#if UnstableSortedCollections #if DEBUG import _CollectionsTestSupport diff --git a/Tests/SortedCollectionsTests/SortedDictionary/SortedDictionary Tests.swift b/Tests/SortedCollectionsTests/SortedDictionary/SortedDictionary Tests.swift index e8b13486..d12e62a0 100644 --- a/Tests/SortedCollectionsTests/SortedDictionary/SortedDictionary Tests.swift +++ b/Tests/SortedCollectionsTests/SortedDictionary/SortedDictionary Tests.swift @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#if COLLECTIONS_UNSTABLE_SORTED_COLLECTIONS +#if UnstableSortedCollections #if DEBUG import _CollectionsTestSupport diff --git a/Tests/SortedCollectionsTests/SortedDictionary/SortedDictionary Utils.swift b/Tests/SortedCollectionsTests/SortedDictionary/SortedDictionary Utils.swift index 60742e2d..e9e885f8 100644 --- a/Tests/SortedCollectionsTests/SortedDictionary/SortedDictionary Utils.swift +++ b/Tests/SortedCollectionsTests/SortedDictionary/SortedDictionary Utils.swift @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#if COLLECTIONS_UNSTABLE_SORTED_COLLECTIONS +#if UnstableSortedCollections import _CollectionsTestSupport import SortedCollections diff --git a/Tests/SortedCollectionsTests/SortedSet/SortedSet Tests.swift b/Tests/SortedCollectionsTests/SortedSet/SortedSet Tests.swift index ab5a3f88..83553e3e 100644 --- a/Tests/SortedCollectionsTests/SortedSet/SortedSet Tests.swift +++ b/Tests/SortedCollectionsTests/SortedSet/SortedSet Tests.swift @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#if COLLECTIONS_UNSTABLE_SORTED_COLLECTIONS +#if UnstableSortedCollections import XCTest @_spi(Testing) import SortedCollections diff --git a/Tests/_CollectionsTestSupport/AssertionContexts/Assertions+Containers.swift b/Tests/_CollectionsTestSupport/AssertionContexts/Assertions+Containers.swift index cdb4665d..397f4bbc 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.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && UnstableContainersPreview /// 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.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && UnstableContainersPreview @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 6c7782ea..9b6c4099 100644 --- a/Tests/_CollectionsTestSupport/ConformanceCheckers/CheckContainer.swift +++ b/Tests/_CollectionsTestSupport/ConformanceCheckers/CheckContainer.swift @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && UnstableContainersPreview import XCTest #if COLLECTIONS_SINGLE_MODULE import Collections diff --git a/Tests/_CollectionsTestSupport/MinimalTypes/CustomDrain.swift b/Tests/_CollectionsTestSupport/MinimalTypes/CustomDrain.swift index 8b7d1404..8fcbd62b 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.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && UnstableContainersPreview @available(SwiftStdlib 5.0, *) package struct CustomDrain: ~Copyable { diff --git a/Tests/_CollectionsTestSupport/MinimalTypes/CustomProducer.swift b/Tests/_CollectionsTestSupport/MinimalTypes/CustomProducer.swift index f0254329..cc2bf20f 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.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && UnstableContainersPreview @available(SwiftStdlib 5.0, *) package struct CustomProducer: ~Copyable { diff --git a/Tests/_CollectionsTestSupport/MinimalTypes/StaccatoContainer.swift b/Tests/_CollectionsTestSupport/MinimalTypes/StaccatoContainer.swift index 39c9ef67..1e7646db 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.4) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if compiler(>=6.4) && UnstableContainersPreview /// A container type with user-defined contents and storage chunks. /// Useful for testing. @available(SwiftStdlib 5.0, *) diff --git a/Tests/_CollectionsTestSupport/Utilities/LifetimeTrackedStruct.swift b/Tests/_CollectionsTestSupport/Utilities/LifetimeTrackedStruct.swift index be41f3b6..d0c3e67c 100644 --- a/Tests/_CollectionsTestSupport/Utilities/LifetimeTrackedStruct.swift +++ b/Tests/_CollectionsTestSupport/Utilities/LifetimeTrackedStruct.swift @@ -69,7 +69,7 @@ extension LifetimeTrackedStruct: TestPrintable where Payload: TestPrintable & ~C } #endif -#if compiler(>=6.4) && COLLECTIONS_UNSTABLE_HASHED_CONTAINERS +#if compiler(>=6.4) && UnstableHashedContainers extension LifetimeTrackedStruct: Equatable where Payload: Equatable & ~Copyable { public static func == (left: borrowing Self, right: borrowing Self) -> Bool { return left.payload == right.payload diff --git a/Tests/_CollectionsTestSupport/Utilities/TestPrintable.swift b/Tests/_CollectionsTestSupport/Utilities/TestPrintable.swift index b34b7f9f..762781ef 100644 --- a/Tests/_CollectionsTestSupport/Utilities/TestPrintable.swift +++ b/Tests/_CollectionsTestSupport/Utilities/TestPrintable.swift @@ -108,7 +108,7 @@ extension OutputSpan: TestPrintable where Element: ~Copyable { } #endif -#if COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW +#if UnstableContainersPreview @available(SwiftStdlib 5.0, *) extension InputSpan: TestPrintable where Element: ~Copyable { public var testDescription: String {