Skip to content

Commit b713d76

Browse files
committed
deprecations
1 parent d713aef commit b713d76

File tree

4 files changed

+7
-19
lines changed

4 files changed

+7
-19
lines changed

lib/Sema/CodeSynthesisDistributedActor.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -693,7 +693,6 @@ static FuncDecl *createSameSignatureDistributedThunkDecl(DeclContext *DC,
693693
/*parameterNameLoc=*/SourceLoc(), paramName, DC);
694694

695695
paramDecl->setImplicit(true);
696-
paramDecl->setSending();
697696
paramDecl->setSpecifier(funcParam->getSpecifier());
698697
paramDecl->setInterfaceType(funcParam->getInterfaceType());
699698

stdlib/public/Concurrency/Task.cpp

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -735,22 +735,6 @@ swift_task_create_commonImpl(size_t rawTaskCreateFlags,
735735
/// FIXME: this is the fail path
736736
if (group) {
737737
assert(parent && "a task created in a group must be a child task");
738-
//
739-
// // Prevent task-local misuse;
740-
// // We must not allow an addTask {} wrapped immediately with a withValue {}
741-
// auto ParentLocal = parent->_private().Local;
742-
// if (auto taskLocalHeadLinkType = ParentLocal.peekHeadLinkType()) {
743-
// if (taskLocalHeadLinkType ==
744-
// swift::TaskLocal::NextLinkType::IsNextCreatedInTaskGroupBody) {
745-
//#if !SWIFT_CONCURRENCY_EMBEDDED
746-
// swift_task_reportIllegalTaskLocalBindingWithinWithTaskGroup(
747-
// nullptr, 0, true, 0);
748-
//#endif
749-
// // TODO(ktoso): If we were to keep this crash mode; offer a better failure for embedded swift
750-
// abort();
751-
// }
752-
// }
753-
//
754738
// Add to the task group, if requested.
755739
if (taskCreateFlags.addPendingGroupTaskUnconditionally()) {
756740
assert(group && "Missing group");

stdlib/public/Concurrency/TaskLocal.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,9 @@ TaskLocal::Item::copyTo(AsyncTask *target) {
289289
// =============================================================================
290290
// ==== checks -----------------------------------------------------------------
291291

292+
/// UNUSED: This is effectively not used anymore by new runtimes because we will
293+
/// defensively copy in this situation since Swift 6, rather than crash as a
294+
/// means of defence.
292295
SWIFT_CC(swift)
293296
static void swift_task_reportIllegalTaskLocalBindingWithinWithTaskGroupImpl(
294297
const unsigned char *_unused_file, uintptr_t _unused_fileLength,

stdlib/public/Concurrency/TaskLocal.swift

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -362,8 +362,9 @@ func _taskLocalsCopy(
362362

363363
// ==== Checks -----------------------------------------------------------------
364364

365-
@available(SwiftStdlib 5.1, *)
366365
@usableFromInline
366+
@available(SwiftStdlib 5.1, *)
367+
@available(*, deprecated, message: "The situation diagnosed by this is not handled gracefully rather than by crashing")
367368
func _checkIllegalTaskLocalBindingWithinWithTaskGroup(file: String, line: UInt) {
368369
if _taskHasTaskGroupStatusRecord() {
369370
file.withCString { _fileStart in
@@ -373,8 +374,9 @@ func _checkIllegalTaskLocalBindingWithinWithTaskGroup(file: String, line: UInt)
373374
}
374375
}
375376

376-
@available(SwiftStdlib 5.1, *)
377377
@usableFromInline
378+
@available(SwiftStdlib 5.1, *)
379+
@available(*, deprecated, message: "The situation diagnosed by this is not handled gracefully rather than by crashing")
378380
@_silgen_name("swift_task_reportIllegalTaskLocalBindingWithinWithTaskGroup")
379381
func _reportIllegalTaskLocalBindingWithinWithTaskGroup(
380382
_ _filenameStart: UnsafePointer<Int8>,

0 commit comments

Comments
 (0)