Skip to content

Commit ec8caf3

Browse files
authored
Remove the experimental @task macro (#82437)
1 parent 79af04c commit ec8caf3

File tree

5 files changed

+0
-317
lines changed

5 files changed

+0
-317
lines changed

lib/Macros/Sources/SwiftMacros/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ add_swift_macro_library(SwiftMacros
1414
OptionSetMacro.swift
1515
DebugDescriptionMacro.swift
1616
DistributedResolvableMacro.swift
17-
TaskMacro.swift
1817
SyntaxExtensions.swift
1918
TaskLocalMacro.swift
2019
SwiftifyImportMacro.swift

lib/Macros/Sources/SwiftMacros/TaskMacro.swift

Lines changed: 0 additions & 126 deletions
This file was deleted.

lib/Sema/TypeCheckMacros.cpp

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1902,18 +1902,6 @@ ExpandBodyMacroRequest::evaluate(Evaluator &evaluator,
19021902
if (bufferID)
19031903
return;
19041904

1905-
// '@Task' is gated behind the 'ConcurrencySyntaxSugar'
1906-
// experimental feature.
1907-
if (macro->getParentModule()->getName().is("_Concurrency") &&
1908-
macro->getBaseIdentifier().is("Task") &&
1909-
!ctx.LangOpts.hasFeature(Feature::ConcurrencySyntaxSugar)) {
1910-
ctx.Diags.diagnose(
1911-
customAttr->getLocation(),
1912-
diag::experimental_macro,
1913-
macro->getName());
1914-
return;
1915-
}
1916-
19171905
SourceFile * macroSourceFile = nullptr;
19181906
if (auto *fnDecl = fn.getAbstractFunctionDecl()) {
19191907
macroSourceFile = ::evaluateAttachedMacro(

stdlib/public/Concurrency/Actor.swift

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -99,27 +99,6 @@ internal func _enqueueOnMain(_ job: UnownedJob)
9999
@freestanding(expression)
100100
public macro isolation<T>() -> T = Builtin.IsolationMacro
101101

102-
/// Wrap the function body in a new top-level task on behalf of the
103-
/// given actor.
104-
@available(SwiftStdlib 5.1, *)
105-
@attached(body)
106-
public macro Task(
107-
on actor: any GlobalActor,
108-
name: String? = nil,
109-
priority: TaskPriority? = nil
110-
) =
111-
#externalMacro(module: "SwiftMacros", type: "TaskMacro")
112-
113-
/// Wrap the function body in a new top-level task on behalf of the
114-
/// current actor.
115-
@available(SwiftStdlib 5.1, *)
116-
@attached(body)
117-
public macro Task(
118-
name: String? = nil,
119-
priority: TaskPriority? = nil
120-
) =
121-
#externalMacro(module: "SwiftMacros", type: "TaskMacro")
122-
123102
#endif
124103

125104
#if $IsolatedAny

test/Macros/task_macro.swift

Lines changed: 0 additions & 157 deletions
This file was deleted.

0 commit comments

Comments
 (0)