diff --git a/stdlib/public/Concurrency/PartialAsyncTask.swift b/stdlib/public/Concurrency/PartialAsyncTask.swift index 74df2beb05559..05b748b3d1c5e 100644 --- a/stdlib/public/Concurrency/PartialAsyncTask.swift +++ b/stdlib/public/Concurrency/PartialAsyncTask.swift @@ -2,7 +2,7 @@ // // This source file is part of the Swift.org open source project // -// Copyright (c) 2020 Apple Inc. and the Swift project authors +// Copyright (c) 2020 - 2021 Apple Inc. and the Swift project authors // Licensed under Apache License v2.0 with Runtime Library Exception // // See https://swift.org/LICENSE.txt for license information @@ -16,11 +16,7 @@ import Swift /// A unit of scheduleable work. /// /// Unless you're implementing a scheduler, -/// you don't generally interact with partial tasks directly. -@available(SwiftStdlib 5.5, *) -public typealias PartialAsyncTask = UnownedJob - -/// A job is a unit of scheduleable work. +/// you don't generally interact with jobs directly. @available(SwiftStdlib 5.5, *) @frozen public struct UnownedJob { diff --git a/stdlib/public/Concurrency/SourceCompatibilityShims.swift b/stdlib/public/Concurrency/SourceCompatibilityShims.swift index 540f2c5b53340..0b8be852fabfe 100644 --- a/stdlib/public/Concurrency/SourceCompatibilityShims.swift +++ b/stdlib/public/Concurrency/SourceCompatibilityShims.swift @@ -2,7 +2,7 @@ // // This source file is part of the Swift.org open source project // -// Copyright (c) 2020 Apple Inc. and the Swift project authors +// Copyright (c) 2020 - 2021 Apple Inc. and the Swift project authors // Licensed under Apache License v2.0 with Runtime Library Exception // // See https://swift.org/LICENSE.txt for license information @@ -255,3 +255,7 @@ extension ThrowingTaskGroup { @available(SwiftStdlib 5.5, *) @available(*, deprecated, message: "please use UnsafeContination<..., Error>") public typealias UnsafeThrowingContinuation = UnsafeContinuation + +@available(SwiftStdlib 5.5, *) +@available(*, deprecated, renamed: "UnownedJob") +public typealias PartialAsyncTask = UnownedJob diff --git a/test/stdlib/Concurrency.swift b/test/stdlib/Concurrency.swift index a315e699a120b..97bd584bcbb71 100644 --- a/test/stdlib/Concurrency.swift +++ b/test/stdlib/Concurrency.swift @@ -7,6 +7,8 @@ import _Concurrency // Make sure the type shows up @available(SwiftStdlib 5.5, *) extension PartialAsyncTask { + // expected-warning@-1 {{'PartialAsyncTask' is deprecated: renamed to 'UnownedJob'}} + // expected-note@-2 {{use 'UnownedJob' instead}} } @available(SwiftStdlib 5.5, *) extension UnownedJob {