mirror of
https://github.com/apple/swift-collections
synced 2026-11-30 05:18:44 +00:00
Use the defines from traits directly
Package traits already pass defines with their trait name when building. Instead of adding our own conditional defines based on the traits we can use the trait provided defines directly. I observed that various tooling behaves better with the trait provided defines.
This commit is contained in:
1 parent
12eb78f778
commit
3c373b900c
208 files changed
+359
-369
No files matched your search
@@ -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_<Element> & ~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,
|
||||
|
||||
Reference in new issue
Block a user