Skip to content

Commit

Permalink
[NFC] stdlib: fix use of __owned in deprecation messages (swiftlang…
Browse files Browse the repository at this point in the history
…#69995)

`consuming` is the actual parameter ownership modifier used in the non-deprecated declaration.
  • Loading branch information
MaxDesiatov authored Nov 27, 2023
1 parent bf62e44 commit bfbc0de
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions stdlib/public/Concurrency/Executor.swift
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public protocol Executor: AnyObject, Sendable {
// since it lacks move-only type support.
#if !SWIFT_STDLIB_TASK_TO_THREAD_MODEL_CONCURRENCY
@available(SwiftStdlib 5.9, *)
@available(*, deprecated, message: "Implement 'enqueue(_: __owned ExecutorJob)' instead")
@available(*, deprecated, message: "Implement 'enqueue(_: consuming ExecutorJob)' instead")
func enqueue(_ job: consuming Job)
#endif // !SWIFT_STDLIB_TASK_TO_THREAD_MODEL_CONCURRENCY

Expand All @@ -47,7 +47,7 @@ public protocol SerialExecutor: Executor {
@_nonoverride
#if !SWIFT_STDLIB_TASK_TO_THREAD_MODEL_CONCURRENCY
@available(SwiftStdlib 5.1, *)
@available(*, deprecated, message: "Implement 'enqueue(_: __owned ExecutorJob)' instead")
@available(*, deprecated, message: "Implement 'enqueue(_: consuming ExecutorJob)' instead")
#endif // !SWIFT_STDLIB_TASK_TO_THREAD_MODEL_CONCURRENCY
func enqueue(_ job: UnownedJob)

Expand All @@ -58,7 +58,7 @@ public protocol SerialExecutor: Executor {
// work-scheduling operation.
@_nonoverride
@available(SwiftStdlib 5.9, *)
@available(*, deprecated, message: "Implement 'enqueue(_: __owned ExecutorJob)' instead")
@available(*, deprecated, message: "Implement 'enqueue(_: consuming ExecutorJob)' instead")
func enqueue(_ job: consuming Job)
#endif // !SWIFT_STDLIB_TASK_TO_THREAD_MODEL_CONCURRENCY

Expand Down

0 comments on commit bfbc0de

Please sign in to comment.