@@ -23,7 +23,8 @@ import Swift
23
23
/// use-after-free errors. Operations on `Span` are bounds-checked,
24
24
/// ensuring spcial safety and avoiding buffer overflow errors.
25
25
@frozen
26
- @available ( SwiftStdlib 6 . 1 , * )
26
+ @available ( SwiftStdlib 5 . 0 , * )
27
+ @_originallyDefinedIn ( module: " Swift " , _linkerModule: " Compatibility62 " , SwiftStdlib 6 . 0 )
27
28
@safe
28
29
public struct Span < Element: ~ Copyable & ~ Escapable>
29
30
: ~ Escapable, Copyable, BitwiseCopyable {
@@ -85,10 +86,10 @@ public struct Span<Element: ~Copyable & ~Escapable>
85
86
}
86
87
}
87
88
88
- @available ( SwiftStdlib 6 . 1 , * )
89
+ @available ( SwiftStdlib 5 . 0 , * )
89
90
extension Span : @unchecked Sendable where Element: Sendable { }
90
91
91
- @available ( SwiftStdlib 6 . 1 , * )
92
+ @available ( SwiftStdlib 5 . 0 , * )
92
93
extension Span where Element: ~ Copyable {
93
94
94
95
/// Unsafely create a `Span` over initialized memory.
@@ -162,7 +163,7 @@ extension Span where Element: ~Copyable {
162
163
}
163
164
}
164
165
165
- @available ( SwiftStdlib 6 . 1 , * )
166
+ @available ( SwiftStdlib 5 . 0 , * )
166
167
extension Span {
167
168
168
169
/// Unsafely create a `Span` over initialized memory.
@@ -206,7 +207,7 @@ extension Span {
206
207
}
207
208
}
208
209
209
- @available ( SwiftStdlib 6 . 1 , * )
210
+ @available ( SwiftStdlib 5 . 0 , * )
210
211
extension Span where Element: BitwiseCopyable {
211
212
212
213
/// Unsafely create a `Span` over initialized memory.
@@ -361,7 +362,7 @@ extension Span where Element: BitwiseCopyable {
361
362
}
362
363
}
363
364
364
- @available ( SwiftStdlib 6 . 1 , * )
365
+ @available ( SwiftStdlib 5 . 0 , * )
365
366
extension Span where Element: ~ Copyable {
366
367
367
368
/// The number of elements in the span.
@@ -392,7 +393,7 @@ extension Span where Element: ~Copyable {
392
393
}
393
394
}
394
395
395
- @available ( SwiftStdlib 6 . 1 , * )
396
+ @available ( SwiftStdlib 5 . 0 , * )
396
397
extension Span where Element: ~ Copyable {
397
398
398
399
/// Accesses the element at the specified position in the `Span`.
@@ -439,7 +440,7 @@ extension Span where Element: ~Copyable {
439
440
}
440
441
}
441
442
442
- @available ( SwiftStdlib 6 . 1 , * )
443
+ @available ( SwiftStdlib 5 . 0 , * )
443
444
extension Span where Element: BitwiseCopyable {
444
445
445
446
/// Accesses the element at the specified position in the `Span`.
@@ -480,7 +481,7 @@ extension Span where Element: BitwiseCopyable {
480
481
}
481
482
482
483
// MARK: sub-spans
483
- @available ( SwiftStdlib 6 . 1 , * )
484
+ @available ( SwiftStdlib 5 . 0 , * )
484
485
extension Span where Element: ~ Copyable {
485
486
486
487
/// Constructs a new span over the items within the supplied range of
@@ -594,7 +595,7 @@ extension Span where Element: ~Copyable {
594
595
}
595
596
596
597
// MARK: UnsafeBufferPointer access hatch
597
- @available ( SwiftStdlib 6 . 1 , * )
598
+ @available ( SwiftStdlib 5 . 0 , * )
598
599
extension Span where Element: ~ Copyable {
599
600
600
601
/// Calls a closure with a pointer to the viewed contiguous storage.
@@ -624,7 +625,7 @@ extension Span where Element: ~Copyable {
624
625
}
625
626
}
626
627
627
- @available ( SwiftStdlib 6 . 1 , * )
628
+ @available ( SwiftStdlib 5 . 0 , * )
628
629
extension Span where Element: BitwiseCopyable {
629
630
630
631
/// Calls the given closure with a pointer to the underlying bytes of
@@ -651,7 +652,7 @@ extension Span where Element: BitwiseCopyable {
651
652
}
652
653
}
653
654
654
- @available( SwiftStdlib 6 . 1 , * )
655
+ @available( SwiftStdlib 5 . 0 , * )
655
656
extension Span where Element: ~ Copyable {
656
657
/// Returns a Boolean value indicating whether two `Span` instances
657
658
/// refer to the same region in memory.
@@ -684,7 +685,7 @@ extension Span where Element: ~Copyable {
684
685
}
685
686
686
687
// MARK: prefixes and suffixes
687
- @available ( SwiftStdlib 6 . 1 , * )
688
+ @available ( SwiftStdlib 5 . 0 , * )
688
689
extension Span where Element: ~ Copyable {
689
690
690
691
/// Returns a span containing the initial elements of this span,
0 commit comments