Drop support for Swift 6.0 and 6.1

This allows the use of Span types without `#if compiler` guards.
This commit is contained in:
Karoy Lorentey committed 2026-09-21 13:34:39 -07:00
1 parent 78bb4bf6b9
commit 537bf9cbfb
145 files changed
+342 -1047

No files matched your search

+4 -6
View File
@@ -30,7 +30,7 @@ struct ArrayLayout {
self.capacity = capacity
self.count = count
}
var isFull: Bool { count == capacity }
var isEmpty: Bool { count == 0 }
var freeCapacity: Int { capacity - count }
@@ -74,7 +74,6 @@ func withSomeArrayLayouts<E: Error>(
}
}
#if compiler(>=6.2)
extension RigidArray where Element: ~Copyable {
init(layout: ArrayLayout, using generator: (Int) -> Element) {
self.init(capacity: layout.capacity) { span in
@@ -98,7 +97,7 @@ extension LifetimeTracker {
) -> RigidArray<LifetimeTracked<Element>> {
RigidArray(layout: layout, using: { self.instance(for: generator($0)) })
}
func uniqueArray<Element>(
layout: ArrayLayout,
using generator: (Int) -> Element = { $0 }
@@ -108,7 +107,7 @@ extension LifetimeTracker {
}
return UniqueArray(consuming: contents)
}
#if UnstableContainersPreview
func withInputSpan<Element>(
layout: ArrayLayout,
@@ -128,7 +127,7 @@ extension LifetimeTracker {
buffer.deallocate()
}
#endif
func withOutputSpan<Element>(
layout: ArrayLayout,
using generator: (Int) -> Element,
@@ -140,4 +139,3 @@ extension LifetimeTracker {
contents.edit(body)
}
}
#endif