Skip to content

Commit 10d115b

Browse files
committed
[Concurrency] Use the SwiftStdlib 5.5 macro instead of 9999 versions
1 parent 0233b94 commit 10d115b

26 files changed

+156
-156
lines changed

stdlib/public/Concurrency/Actor.swift

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import Swift
1717
///
1818
/// The \c Actor protocol generalizes over all actor types. Actor types
1919
/// implicitly conform to this protocol.
20-
@available(macOS 9999, iOS 9999, watchOS 9999, tvOS 9999, *)
20+
@available(SwiftStdlib 5.5, *)
2121
public protocol Actor: AnyObject, Sendable {
2222

2323
/// Retrieve the executor for this actor as an optimized, unowned
@@ -37,24 +37,24 @@ public protocol Actor: AnyObject, Sendable {
3737

3838
/// Called to initialize the default actor instance in an actor.
3939
/// The implementation will call this within the actor's initializer.
40-
@available(macOS 9999, iOS 9999, watchOS 9999, tvOS 9999, *)
40+
@available(SwiftStdlib 5.5, *)
4141
@_silgen_name("swift_defaultActor_initialize")
4242
public func _defaultActorInitialize(_ actor: AnyObject)
4343

4444
/// Called to destroy the default actor instance in an actor.
4545
/// The implementation will call this within the actor's deinit.
46-
@available(macOS 9999, iOS 9999, watchOS 9999, tvOS 9999, *)
46+
@available(SwiftStdlib 5.5, *)
4747
@_silgen_name("swift_defaultActor_destroy")
4848
public func _defaultActorDestroy(_ actor: AnyObject)
4949

50-
@available(macOS 9999, iOS 9999, watchOS 9999, tvOS 9999, *)
50+
@available(SwiftStdlib 5.5, *)
5151
@_silgen_name("swift_task_enqueueMainExecutor")
5252
@usableFromInline
5353
internal func _enqueueOnMain(_ job: UnownedJob)
5454

5555
/// A singleton actor whose executor is equivalent to
5656
/// \c DispatchQueue.main, which is the main dispatch queue.
57-
@available(macOS 9999, iOS 9999, watchOS 9999, tvOS 9999, *)
57+
@available(SwiftStdlib 5.5, *)
5858
@globalActor public final actor MainActor: SerialExecutor {
5959
public static let shared = MainActor()
6060

@@ -75,15 +75,15 @@ internal func _enqueueOnMain(_ job: UnownedJob)
7575
}
7676

7777
// Used by the concurrency runtime
78-
@available(macOS 9999, iOS 9999, watchOS 9999, tvOS 9999, *)
78+
@available(SwiftStdlib 5.5, *)
7979
extension SerialExecutor {
8080
@_silgen_name("_swift_task_getMainExecutor")
8181
internal func _getMainExecutor() -> UnownedSerialExecutor {
8282
return MainActor.shared.unownedExecutor
8383
}
8484
}
8585

86-
@available(macOS 9999, iOS 9999, watchOS 9999, tvOS 9999, *)
86+
@available(SwiftStdlib 5.5, *)
8787
extension MainActor {
8888
/// Execute the given body closure on the main actor.
8989
public static func run<T>(

stdlib/public/Concurrency/AsyncCompactMapSequence.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
import Swift
1414

15-
@available(macOS 9999, iOS 9999, watchOS 9999, tvOS 9999, *)
15+
@available(SwiftStdlib 5.5, *)
1616
extension AsyncSequence {
1717
@inlinable
1818
public __consuming func compactMap<ElementOfResult>(
@@ -22,7 +22,7 @@ extension AsyncSequence {
2222
}
2323
}
2424

25-
@available(macOS 9999, iOS 9999, watchOS 9999, tvOS 9999, *)
25+
@available(SwiftStdlib 5.5, *)
2626
public struct AsyncCompactMapSequence<Base: AsyncSequence, ElementOfResult> {
2727
@usableFromInline
2828
let base: Base
@@ -40,7 +40,7 @@ public struct AsyncCompactMapSequence<Base: AsyncSequence, ElementOfResult> {
4040
}
4141
}
4242

43-
@available(macOS 9999, iOS 9999, watchOS 9999, tvOS 9999, *)
43+
@available(SwiftStdlib 5.5, *)
4444
extension AsyncCompactMapSequence: AsyncSequence {
4545
public typealias Element = ElementOfResult
4646
public typealias AsyncIterator = Iterator

stdlib/public/Concurrency/AsyncDropFirstSequence.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
import Swift
1414

15-
@available(macOS 9999, iOS 9999, watchOS 9999, tvOS 9999, *)
15+
@available(SwiftStdlib 5.5, *)
1616
extension AsyncSequence {
1717
@inlinable
1818
public __consuming func dropFirst(
@@ -24,7 +24,7 @@ extension AsyncSequence {
2424
}
2525
}
2626

27-
@available(macOS 9999, iOS 9999, watchOS 9999, tvOS 9999, *)
27+
@available(SwiftStdlib 5.5, *)
2828
public struct AsyncDropFirstSequence<Base: AsyncSequence> {
2929
@usableFromInline
3030
let base: Base
@@ -39,7 +39,7 @@ public struct AsyncDropFirstSequence<Base: AsyncSequence> {
3939
}
4040
}
4141

42-
@available(macOS 9999, iOS 9999, watchOS 9999, tvOS 9999, *)
42+
@available(SwiftStdlib 5.5, *)
4343
extension AsyncDropFirstSequence: AsyncSequence {
4444
public typealias Element = Base.Element
4545
public typealias AsyncIterator = Iterator
@@ -78,7 +78,7 @@ extension AsyncDropFirstSequence: AsyncSequence {
7878
}
7979
}
8080

81-
@available(macOS 9999, iOS 9999, watchOS 9999, tvOS 9999, *)
81+
@available(SwiftStdlib 5.5, *)
8282
extension AsyncDropFirstSequence {
8383
@inlinable
8484
public __consuming func dropFirst(

stdlib/public/Concurrency/AsyncDropWhileSequence.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
import Swift
1414

15-
@available(macOS 9999, iOS 9999, watchOS 9999, tvOS 9999, *)
15+
@available(SwiftStdlib 5.5, *)
1616
extension AsyncSequence {
1717
@inlinable
1818
public __consuming func drop(
@@ -22,7 +22,7 @@ extension AsyncSequence {
2222
}
2323
}
2424

25-
@available(macOS 9999, iOS 9999, watchOS 9999, tvOS 9999, *)
25+
@available(SwiftStdlib 5.5, *)
2626
public struct AsyncDropWhileSequence<Base: AsyncSequence> {
2727
@usableFromInline
2828
let base: Base
@@ -40,7 +40,7 @@ public struct AsyncDropWhileSequence<Base: AsyncSequence> {
4040
}
4141
}
4242

43-
@available(macOS 9999, iOS 9999, watchOS 9999, tvOS 9999, *)
43+
@available(SwiftStdlib 5.5, *)
4444
extension AsyncDropWhileSequence: AsyncSequence {
4545
public typealias Element = Base.Element
4646
public typealias AsyncIterator = Iterator

stdlib/public/Concurrency/AsyncFilterSequence.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
import Swift
1414

15-
@available(macOS 9999, iOS 9999, watchOS 9999, tvOS 9999, *)
15+
@available(SwiftStdlib 5.5, *)
1616
extension AsyncSequence {
1717
@inlinable
1818
public __consuming func filter(
@@ -22,7 +22,7 @@ extension AsyncSequence {
2222
}
2323
}
2424

25-
@available(macOS 9999, iOS 9999, watchOS 9999, tvOS 9999, *)
25+
@available(SwiftStdlib 5.5, *)
2626
public struct AsyncFilterSequence<Base: AsyncSequence> {
2727
@usableFromInline
2828
let base: Base
@@ -40,7 +40,7 @@ public struct AsyncFilterSequence<Base: AsyncSequence> {
4040
}
4141
}
4242

43-
@available(macOS 9999, iOS 9999, watchOS 9999, tvOS 9999, *)
43+
@available(SwiftStdlib 5.5, *)
4444
extension AsyncFilterSequence: AsyncSequence {
4545
public typealias Element = Base.Element
4646
public typealias AsyncIterator = Iterator

stdlib/public/Concurrency/AsyncFlatMapSequence.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
import Swift
1414

15-
@available(macOS 9999, iOS 9999, watchOS 9999, tvOS 9999, *)
15+
@available(SwiftStdlib 5.5, *)
1616
extension AsyncSequence {
1717
@inlinable
1818
public __consuming func flatMap<SegmentOfResult: AsyncSequence>(
@@ -22,7 +22,7 @@ extension AsyncSequence {
2222
}
2323
}
2424

25-
@available(macOS 9999, iOS 9999, watchOS 9999, tvOS 9999, *)
25+
@available(SwiftStdlib 5.5, *)
2626
public struct AsyncFlatMapSequence<Base: AsyncSequence, SegmentOfResult: AsyncSequence> {
2727
@usableFromInline
2828
let base: Base
@@ -40,7 +40,7 @@ public struct AsyncFlatMapSequence<Base: AsyncSequence, SegmentOfResult: AsyncSe
4040
}
4141
}
4242

43-
@available(macOS 9999, iOS 9999, watchOS 9999, tvOS 9999, *)
43+
@available(SwiftStdlib 5.5, *)
4444
extension AsyncFlatMapSequence: AsyncSequence {
4545
public typealias Element = SegmentOfResult.Element
4646
public typealias AsyncIterator = Iterator

stdlib/public/Concurrency/AsyncIteratorProtocol.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
import Swift
1414

15-
@available(macOS 9999, iOS 9999, watchOS 9999, tvOS 9999, *)
15+
@available(SwiftStdlib 5.5, *)
1616
@rethrows
1717
public protocol AsyncIteratorProtocol {
1818
associatedtype Element

stdlib/public/Concurrency/AsyncLet.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,24 +16,24 @@ import Swift
1616
// ==== Async Let -------------------------------------------------------------
1717
// Only has internal / builtin functions as it is not really accessible directly
1818

19-
@available(macOS 9999, iOS 9999, watchOS 9999, tvOS 9999, *)
19+
@available(SwiftStdlib 5.5, *)
2020
@_silgen_name("swift_asyncLet_start")
2121
public func _asyncLetStart<T>(
2222
asyncLet: Builtin.RawPointer,
2323
operation: @Sendable () async throws -> T
2424
)
2525

2626
/// Similar to _taskFutureGet but for AsyncLet
27-
@available(macOS 9999, iOS 9999, watchOS 9999, tvOS 9999, *)
27+
@available(SwiftStdlib 5.5, *)
2828
@_silgen_name("swift_asyncLet_wait")
2929
public func _asyncLetGet<T>(asyncLet: Builtin.RawPointer) async -> T
3030

3131
///// Similar to _taskFutureGetThrowing but for AsyncLet
32-
@available(macOS 9999, iOS 9999, watchOS 9999, tvOS 9999, *)
32+
@available(SwiftStdlib 5.5, *)
3333
@_silgen_name("swift_asyncLet_wait_throwing")
3434
public func _asyncLetGetThrowing<T>(asyncLet: Builtin.RawPointer) async throws -> T
3535

36-
@available(macOS 9999, iOS 9999, watchOS 9999, tvOS 9999, *)
36+
@available(SwiftStdlib 5.5, *)
3737
@_silgen_name("swift_asyncLet_end")
3838
public func _asyncLetEnd(
3939
asyncLet: Builtin.RawPointer // TODO: should this take __owned?

stdlib/public/Concurrency/AsyncMapSequence.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
import Swift
1414

15-
@available(macOS 9999, iOS 9999, watchOS 9999, tvOS 9999, *)
15+
@available(SwiftStdlib 5.5, *)
1616
extension AsyncSequence {
1717
@inlinable
1818
public __consuming func map<Transformed>(
@@ -22,7 +22,7 @@ extension AsyncSequence {
2222
}
2323
}
2424

25-
@available(macOS 9999, iOS 9999, watchOS 9999, tvOS 9999, *)
25+
@available(SwiftStdlib 5.5, *)
2626
public struct AsyncMapSequence<Base: AsyncSequence, Transformed> {
2727
@usableFromInline
2828
let base: Base
@@ -40,7 +40,7 @@ public struct AsyncMapSequence<Base: AsyncSequence, Transformed> {
4040
}
4141
}
4242

43-
@available(macOS 9999, iOS 9999, watchOS 9999, tvOS 9999, *)
43+
@available(SwiftStdlib 5.5, *)
4444
extension AsyncMapSequence: AsyncSequence {
4545
public typealias Element = Transformed
4646
public typealias AsyncIterator = Iterator

stdlib/public/Concurrency/AsyncPrefixSequence.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
import Swift
1414

15-
@available(macOS 9999, iOS 9999, watchOS 9999, tvOS 9999, *)
15+
@available(SwiftStdlib 5.5, *)
1616
extension AsyncSequence {
1717
@inlinable
1818
public __consuming func prefix(
@@ -24,7 +24,7 @@ extension AsyncSequence {
2424
}
2525
}
2626

27-
@available(macOS 9999, iOS 9999, watchOS 9999, tvOS 9999, *)
27+
@available(SwiftStdlib 5.5, *)
2828
public struct AsyncPrefixSequence<Base: AsyncSequence> {
2929
@usableFromInline
3030
let base: Base
@@ -39,7 +39,7 @@ public struct AsyncPrefixSequence<Base: AsyncSequence> {
3939
}
4040
}
4141

42-
@available(macOS 9999, iOS 9999, watchOS 9999, tvOS 9999, *)
42+
@available(SwiftStdlib 5.5, *)
4343
extension AsyncPrefixSequence: AsyncSequence {
4444
public typealias Element = Base.Element
4545
public typealias AsyncIterator = Iterator

stdlib/public/Concurrency/AsyncPrefixWhileSequence.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
import Swift
1414

15-
@available(macOS 9999, iOS 9999, watchOS 9999, tvOS 9999, *)
15+
@available(SwiftStdlib 5.5, *)
1616
extension AsyncSequence {
1717
@inlinable
1818
public __consuming func prefix(
@@ -22,7 +22,7 @@ extension AsyncSequence {
2222
}
2323
}
2424

25-
@available(macOS 9999, iOS 9999, watchOS 9999, tvOS 9999, *)
25+
@available(SwiftStdlib 5.5, *)
2626
public struct AsyncPrefixWhileSequence<Base: AsyncSequence> {
2727
@usableFromInline
2828
let base: Base
@@ -40,7 +40,7 @@ public struct AsyncPrefixWhileSequence<Base: AsyncSequence> {
4040
}
4141
}
4242

43-
@available(macOS 9999, iOS 9999, watchOS 9999, tvOS 9999, *)
43+
@available(SwiftStdlib 5.5, *)
4444
extension AsyncPrefixWhileSequence: AsyncSequence {
4545
public typealias Element = Base.Element
4646
public typealias AsyncIterator = Iterator

stdlib/public/Concurrency/AsyncSequence.swift

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@
1212

1313
import Swift
1414

15-
@available(macOS 9999, iOS 9999, watchOS 9999, tvOS 9999, *)
15+
@available(SwiftStdlib 5.5, *)
1616
@rethrows
1717
public protocol AsyncSequence {
1818
associatedtype AsyncIterator: AsyncIteratorProtocol where AsyncIterator.Element == Element
1919
associatedtype Element
2020
__consuming func makeAsyncIterator() -> AsyncIterator
2121
}
2222

23-
@available(macOS 9999, iOS 9999, watchOS 9999, tvOS 9999, *)
23+
@available(SwiftStdlib 5.5, *)
2424
extension AsyncSequence {
2525
@inlinable
2626
public func reduce<Result>(
@@ -51,7 +51,7 @@ extension AsyncSequence {
5151
}
5252
}
5353

54-
@available(macOS 9999, iOS 9999, watchOS 9999, tvOS 9999, *)
54+
@available(SwiftStdlib 5.5, *)
5555
@inlinable
5656
@inline(__always)
5757
func _contains<Source: AsyncSequence>(
@@ -66,7 +66,7 @@ func _contains<Source: AsyncSequence>(
6666
return false
6767
}
6868

69-
@available(macOS 9999, iOS 9999, watchOS 9999, tvOS 9999, *)
69+
@available(SwiftStdlib 5.5, *)
7070
extension AsyncSequence {
7171
@inlinable
7272
public func contains(
@@ -83,7 +83,7 @@ extension AsyncSequence {
8383
}
8484
}
8585

86-
@available(macOS 9999, iOS 9999, watchOS 9999, tvOS 9999, *)
86+
@available(SwiftStdlib 5.5, *)
8787
extension AsyncSequence where Element: Equatable {
8888
@inlinable
8989
public func contains(_ search: Element) async rethrows -> Bool {
@@ -96,7 +96,7 @@ extension AsyncSequence where Element: Equatable {
9696
}
9797
}
9898

99-
@available(macOS 9999, iOS 9999, watchOS 9999, tvOS 9999, *)
99+
@available(SwiftStdlib 5.5, *)
100100
@inlinable
101101
@inline(__always)
102102
func _first<Source: AsyncSequence>(
@@ -111,7 +111,7 @@ func _first<Source: AsyncSequence>(
111111
return nil
112112
}
113113

114-
@available(macOS 9999, iOS 9999, watchOS 9999, tvOS 9999, *)
114+
@available(SwiftStdlib 5.5, *)
115115
extension AsyncSequence {
116116
@inlinable
117117
public func first(
@@ -121,7 +121,7 @@ extension AsyncSequence {
121121
}
122122
}
123123

124-
@available(macOS 9999, iOS 9999, watchOS 9999, tvOS 9999, *)
124+
@available(SwiftStdlib 5.5, *)
125125
extension AsyncSequence {
126126
@inlinable
127127
@warn_unqualified_access
@@ -158,7 +158,7 @@ extension AsyncSequence {
158158
}
159159
}
160160

161-
@available(macOS 9999, iOS 9999, watchOS 9999, tvOS 9999, *)
161+
@available(SwiftStdlib 5.5, *)
162162
extension AsyncSequence where Element: Comparable {
163163
@inlinable
164164
@warn_unqualified_access

0 commit comments

Comments
 (0)