Skip to content

Commit 7c562ea

Browse files
authored
Merge pull request swiftlang#38630 from DougGregor/remove-spawn
2 parents 63124b5 + b86e39d commit 7c562ea

File tree

6 files changed

+2
-23
lines changed

6 files changed

+2
-23
lines changed

include/swift/AST/Attr.def

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -653,11 +653,7 @@ SIMPLE_DECL_ATTR(_inheritActorContext, InheritActorContext,
653653
ABIStableToAdd | ABIStableToRemove | APIBreakingToAdd | APIBreakingToRemove,
654654
116)
655655

656-
CONTEXTUAL_SIMPLE_DECL_ATTR(spawn, Spawn,
657-
DeclModifier | OnVar | ConcurrencyOnly |
658-
ABIBreakingToAdd | ABIBreakingToRemove |
659-
APIBreakingToAdd | APIBreakingToRemove,
660-
117)
656+
// 117 was 'spawn' and is now unused
661657

662658
CONTEXTUAL_SIMPLE_DECL_ATTR(distributed, DistributedActor,
663659
DeclModifier | OnClass | OnFunc |

lib/AST/Decl.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5994,7 +5994,7 @@ bool VarDecl::isMemberwiseInitialized(bool preferDeclaredProperties) const {
59945994
}
59955995

59965996
bool VarDecl::isAsyncLet() const {
5997-
return getAttrs().hasAttribute<AsyncAttr>() || getAttrs().hasAttribute<SpawnAttr>();
5997+
return getAttrs().hasAttribute<AsyncAttr>();
59985998
}
59995999

60006000
void ParamDecl::setSpecifier(Specifier specifier) {

lib/ClangImporter/SwiftLookupTable.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1854,7 +1854,6 @@ SwiftNameLookupExtension::hashExtension(llvm::hash_code code) const {
18541854
return llvm::hash_combine(code, StringRef("swift.lookup"),
18551855
SWIFT_LOOKUP_TABLE_VERSION_MAJOR,
18561856
SWIFT_LOOKUP_TABLE_VERSION_MINOR,
1857-
swiftCtx.LangOpts.EnableExperimentalConcurrency,
18581857
version::getSwiftFullVersion());
18591858
}
18601859

lib/Sema/TypeCheckAttr.cpp

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -257,8 +257,6 @@ class AttributeChecker : public AttributeVisitor<AttributeChecker> {
257257
void visitDistributedActorIndependentAttr(DistributedActorIndependentAttr *attr);
258258
void visitGlobalActorAttr(GlobalActorAttr *attr);
259259
void visitAsyncAttr(AsyncAttr *attr);
260-
void visitSpawnAttr(SpawnAttr *attr);
261-
void visitAsyncOrSpawnAttr(DeclAttribute *attr);
262260
void visitMarkerAttr(MarkerAttr *attr);
263261

264262
void visitReasyncAttr(ReasyncAttr *attr);
@@ -5530,16 +5528,6 @@ void AttributeChecker::visitGlobalActorAttr(GlobalActorAttr *attr) {
55305528
}
55315529

55325530
void AttributeChecker::visitAsyncAttr(AsyncAttr *attr) {
5533-
if (isa<VarDecl>(D)) {
5534-
visitAsyncOrSpawnAttr(attr);
5535-
}
5536-
}
5537-
5538-
void AttributeChecker::visitSpawnAttr(SpawnAttr *attr) {
5539-
visitAsyncOrSpawnAttr(attr);
5540-
}
5541-
5542-
void AttributeChecker::visitAsyncOrSpawnAttr(DeclAttribute *attr) {
55435531
auto var = dyn_cast<VarDecl>(D);
55445532
if (!var)
55455533
return;

lib/Sema/TypeCheckDeclOverride.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1538,7 +1538,6 @@ namespace {
15381538
UNINTERESTING_ATTR(DistributedActorIndependent)
15391539
UNINTERESTING_ATTR(GlobalActor)
15401540
UNINTERESTING_ATTR(Async)
1541-
UNINTERESTING_ATTR(Spawn)
15421541
UNINTERESTING_ATTR(Sendable)
15431542

15441543
UNINTERESTING_ATTR(AtRethrows)

test/decl/var/async_let.swift

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,6 @@ func cook() async throws {
4040
}
4141

4242
func testInterpolation() async {
43-
spawn let x = "\(12345)"
44-
_ = await x
45-
4643
async let y = "\(12345)"
4744
_ = await y
4845
}

0 commit comments

Comments
 (0)