Skip to content

Commit 6802d22

Browse files
committed
[stdlib] Update availability annotations for Span
1 parent c91e295 commit 6802d22

File tree

2 files changed

+25
-25
lines changed

2 files changed

+25
-25
lines changed

stdlib/public/core/Span/RawSpan.swift

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
//
33
// This source file is part of the Swift.org open source project
44
//
5-
// Copyright (c) 2024 Apple Inc. and the Swift project authors
5+
// Copyright (c) 2024 - 2025 Apple Inc. and the Swift project authors
66
// Licensed under Apache License v2.0 with Runtime Library Exception
77
//
88
// See https://swift.org/LICENSE.txt for license information
@@ -18,7 +18,7 @@
1818
/// owning the contiguous memory, ensuring temporal safety and avoiding
1919
/// use-after-free errors. Operations on `RawSpan` are bounds-checked,
2020
/// ensuring spcial safety and avoiding buffer overflow errors.
21-
@available(SwiftStdlib 6.1, *)
21+
@available(SwiftStdlib 6.2, *)
2222
@frozen
2323
@safe
2424
public struct RawSpan: ~Escapable, Copyable, BitwiseCopyable {
@@ -79,10 +79,10 @@ public struct RawSpan: ~Escapable, Copyable, BitwiseCopyable {
7979
}
8080
}
8181

82-
@available(SwiftStdlib 6.1, *)
82+
@available(SwiftStdlib 6.2, *)
8383
extension RawSpan: @unchecked Sendable {}
8484

85-
@available(SwiftStdlib 6.1, *)
85+
@available(SwiftStdlib 6.2, *)
8686
extension RawSpan {
8787

8888
/// Unsafely create a `RawSpan` over initialized memory.
@@ -298,7 +298,7 @@ extension RawSpan {
298298
}
299299
}
300300

301-
@available(SwiftStdlib 6.1, *)
301+
@available(SwiftStdlib 6.2, *)
302302
extension RawSpan {
303303

304304
/// The number of bytes in the span.
@@ -327,7 +327,7 @@ extension RawSpan {
327327
}
328328

329329
// MARK: extracting sub-spans
330-
@available(SwiftStdlib 6.1, *)
330+
@available(SwiftStdlib 6.2, *)
331331
extension RawSpan {
332332

333333
/// Constructs a new span over the bytes within the supplied range of
@@ -437,7 +437,7 @@ extension RawSpan {
437437
}
438438
}
439439

440-
@available(SwiftStdlib 6.1, *)
440+
@available(SwiftStdlib 6.2, *)
441441
extension RawSpan {
442442

443443
/// Calls the given closure with a pointer to the underlying bytes of
@@ -462,7 +462,7 @@ extension RawSpan {
462462
}
463463
}
464464

465-
@available(SwiftStdlib 6.1, *)
465+
@available(SwiftStdlib 6.2, *)
466466
extension RawSpan {
467467

468468
/// View the bytes of this span as type `T`
@@ -494,7 +494,7 @@ extension RawSpan {
494494
}
495495

496496
// MARK: load
497-
@available(SwiftStdlib 6.1, *)
497+
@available(SwiftStdlib 6.2, *)
498498
extension RawSpan {
499499

500500
/// Returns a new instance of the given type, constructed from the raw memory
@@ -608,7 +608,7 @@ extension RawSpan {
608608
}
609609
}
610610

611-
@available(SwiftStdlib 6.1, *)
611+
@available(SwiftStdlib 6.2, *)
612612
extension RawSpan {
613613
/// Returns a Boolean value indicating whether two `RawSpan` instances
614614
/// refer to the same region in memory.
@@ -640,7 +640,7 @@ extension RawSpan {
640640
}
641641

642642
// MARK: prefixes and suffixes
643-
@available(SwiftStdlib 6.1, *)
643+
@available(SwiftStdlib 6.2, *)
644644
extension RawSpan {
645645

646646
/// Returns a span containing the initial bytes of this span,

stdlib/public/core/Span/Span.swift

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
//
33
// This source file is part of the Swift.org open source project
44
//
5-
// Copyright (c) 2024 Apple Inc. and the Swift project authors
5+
// Copyright (c) 2024 - 2025 Apple Inc. and the Swift project authors
66
// Licensed under Apache License v2.0 with Runtime Library Exception
77
//
88
// See https://swift.org/LICENSE.txt for license information
@@ -19,8 +19,8 @@
1919
/// use-after-free errors. Operations on `Span` are bounds-checked,
2020
/// ensuring spcial safety and avoiding buffer overflow errors.
2121
@frozen
22-
@available(SwiftStdlib 6.1, *)
2322
@safe
23+
@available(SwiftStdlib 6.2, *)
2424
public struct Span<Element: ~Copyable & ~Escapable>
2525
: ~Escapable, Copyable, BitwiseCopyable {
2626

@@ -81,10 +81,10 @@ public struct Span<Element: ~Copyable & ~Escapable>
8181
}
8282
}
8383

84-
@available(SwiftStdlib 6.1, *)
84+
@available(SwiftStdlib 6.2, *)
8585
extension Span: @unchecked Sendable where Element: Sendable {}
8686

87-
@available(SwiftStdlib 6.1, *)
87+
@available(SwiftStdlib 6.2, *)
8888
extension Span where Element: ~Copyable {
8989

9090
/// Unsafely create a `Span` over initialized memory.
@@ -161,7 +161,7 @@ extension Span where Element: ~Copyable {
161161
}
162162
}
163163

164-
@available(SwiftStdlib 6.1, *)
164+
@available(SwiftStdlib 6.2, *)
165165
extension Span {
166166

167167
/// Unsafely create a `Span` over initialized memory.
@@ -207,7 +207,7 @@ extension Span {
207207
}
208208
}
209209

210-
@available(SwiftStdlib 6.1, *)
210+
@available(SwiftStdlib 6.2, *)
211211
extension Span where Element: BitwiseCopyable {
212212

213213
/// Unsafely create a `Span` over initialized memory.
@@ -367,7 +367,7 @@ extension Span where Element: BitwiseCopyable {
367367
}
368368
}
369369

370-
@available(SwiftStdlib 6.1, *)
370+
@available(SwiftStdlib 6.2, *)
371371
extension Span where Element: ~Copyable {
372372

373373
/// The number of elements in the span.
@@ -399,7 +399,7 @@ extension Span where Element: ~Copyable {
399399
}
400400
}
401401

402-
@available(SwiftStdlib 6.1, *)
402+
@available(SwiftStdlib 6.2, *)
403403
extension Span where Element: ~Copyable {
404404
@_semantics("fixed_storage.check_index")
405405
@inline(__always)
@@ -452,7 +452,7 @@ extension Span where Element: ~Copyable {
452452
}
453453
}
454454

455-
@available(SwiftStdlib 6.1, *)
455+
@available(SwiftStdlib 6.2, *)
456456
extension Span where Element: BitwiseCopyable {
457457
/// Accesses the element at the specified position in the `Span`.
458458
///
@@ -489,7 +489,7 @@ extension Span where Element: BitwiseCopyable {
489489
}
490490

491491
// MARK: sub-spans
492-
@available(SwiftStdlib 6.1, *)
492+
@available(SwiftStdlib 6.2, *)
493493
extension Span where Element: ~Copyable {
494494

495495
/// Constructs a new span over the items within the supplied range of
@@ -603,7 +603,7 @@ extension Span where Element: ~Copyable {
603603
}
604604

605605
// MARK: UnsafeBufferPointer access hatch
606-
@available(SwiftStdlib 6.1, *)
606+
@available(SwiftStdlib 6.2, *)
607607
extension Span where Element: ~Copyable {
608608

609609
/// Calls a closure with a pointer to the viewed contiguous storage.
@@ -633,7 +633,7 @@ extension Span where Element: ~Copyable {
633633
}
634634
}
635635

636-
@available(SwiftStdlib 6.1, *)
636+
@available(SwiftStdlib 6.2, *)
637637
extension Span where Element: BitwiseCopyable {
638638

639639
/// Calls the given closure with a pointer to the underlying bytes of
@@ -660,7 +660,7 @@ extension Span where Element: BitwiseCopyable {
660660
}
661661
}
662662

663-
@available(SwiftStdlib 6.1, *)
663+
@available(SwiftStdlib 6.2, *)
664664
extension Span where Element: ~Copyable {
665665
/// Returns a Boolean value indicating whether two `Span` instances
666666
/// refer to the same region in memory.
@@ -693,7 +693,7 @@ extension Span where Element: ~Copyable {
693693
}
694694

695695
// MARK: prefixes and suffixes
696-
@available(SwiftStdlib 6.1, *)
696+
@available(SwiftStdlib 6.2, *)
697697
extension Span where Element: ~Copyable {
698698

699699
/// Returns a span containing the initial elements of this span,

0 commit comments

Comments
 (0)