Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion lib/Macros/Sources/SwiftMacros/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ add_swift_macro_library(SwiftMacros
OptionSetMacro.swift
DebugDescriptionMacro.swift
DistributedResolvableMacro.swift
TaskMacro.swift
SyntaxExtensions.swift
TaskLocalMacro.swift
SwiftifyImportMacro.swift
Expand Down
126 changes: 0 additions & 126 deletions lib/Macros/Sources/SwiftMacros/TaskMacro.swift

This file was deleted.

12 changes: 0 additions & 12 deletions lib/Sema/TypeCheckMacros.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1902,18 +1902,6 @@ ExpandBodyMacroRequest::evaluate(Evaluator &evaluator,
if (bufferID)
return;

// '@Task' is gated behind the 'ConcurrencySyntaxSugar'
// experimental feature.
if (macro->getParentModule()->getName().is("_Concurrency") &&
macro->getBaseIdentifier().is("Task") &&
!ctx.LangOpts.hasFeature(Feature::ConcurrencySyntaxSugar)) {
ctx.Diags.diagnose(
customAttr->getLocation(),
diag::experimental_macro,
macro->getName());
return;
}

SourceFile * macroSourceFile = nullptr;
if (auto *fnDecl = fn.getAbstractFunctionDecl()) {
macroSourceFile = ::evaluateAttachedMacro(
Expand Down
21 changes: 0 additions & 21 deletions stdlib/public/Concurrency/Actor.swift
Original file line number Diff line number Diff line change
Expand Up @@ -99,27 +99,6 @@ internal func _enqueueOnMain(_ job: UnownedJob)
@freestanding(expression)
public macro isolation<T>() -> T = Builtin.IsolationMacro

/// Wrap the function body in a new top-level task on behalf of the
/// given actor.
@available(SwiftStdlib 5.1, *)
@attached(body)
public macro Task(
on actor: any GlobalActor,
name: String? = nil,
priority: TaskPriority? = nil
) =
#externalMacro(module: "SwiftMacros", type: "TaskMacro")

/// Wrap the function body in a new top-level task on behalf of the
/// current actor.
@available(SwiftStdlib 5.1, *)
@attached(body)
public macro Task(
name: String? = nil,
priority: TaskPriority? = nil
) =
#externalMacro(module: "SwiftMacros", type: "TaskMacro")

#endif

#if $IsolatedAny
Expand Down
157 changes: 0 additions & 157 deletions test/Macros/task_macro.swift

This file was deleted.