Skip to content

Commit 4fc21de

Browse files
committed
Avoid using Self.self on moveonly types;
See #65668
1 parent b4ca869 commit 4fc21de

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

stdlib/public/Concurrency/PartialAsyncTask.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -153,9 +153,9 @@ public struct Job: Sendable {
153153
/// and it appearing as 0 for _different_ jobs may lead to misunderstanding it as
154154
/// being "the same 0 id job", we specifically print 0 (id not set) as nil.
155155
if (id > 0) {
156-
return "\(Self.self)(id: \(id))"
156+
return "Job(id: \(id))"
157157
} else {
158-
return "\(Self.self)(id: nil)"
158+
return "Job(id: nil)"
159159
}
160160
}
161161
}
@@ -221,9 +221,9 @@ public struct ExecutorJob: Sendable {
221221
/// and it appearing as 0 for _different_ jobs may lead to misunderstanding it as
222222
/// being "the same 0 id job", we specifically print 0 (id not set) as nil.
223223
if (id > 0) {
224-
return "\(Self.self)(id: \(id))"
224+
return "ExecutorJob(id: \(id))"
225225
} else {
226-
return "\(Self.self)(id: nil)"
226+
return "ExecutorJob(id: nil)"
227227
}
228228
}
229229
}

stdlib/public/Distributed/DistributedDefaultExecutor.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ internal final class DistributedRemoteActorReferenceExecutor: SerialExecutor {
2626
@inlinable
2727
public func enqueue(_ job: __owned ExecutorJob) {
2828
let jobDescription = job.description
29-
fatalError("Attempted to enqueue \(Job.self) (\(jobDescription)) on executor of remote distributed actor reference!")
29+
fatalError("Attempted to enqueue ExecutorJob (\(jobDescription)) on executor of remote distributed actor reference!")
3030
}
3131

3232
public func asUnownedSerialExecutor() -> UnownedSerialExecutor {

0 commit comments

Comments
 (0)