Skip to content

Commit f561bfe

Browse files
committed
Remove the unused ActorIsolationRestriction::CrossDistributedActorSelf
1 parent 62b2054 commit f561bfe

File tree

4 files changed

+3
-18
lines changed

4 files changed

+3
-18
lines changed

lib/Sema/TypeCheckConcurrency.cpp

+2-8
Original file line numberDiff line numberDiff line change
@@ -1476,8 +1476,7 @@ namespace {
14761476
break;
14771477
}
14781478
case ActorIsolationRestriction::CrossActorSelf:
1479-
case ActorIsolationRestriction::ActorSelf:
1480-
case ActorIsolationRestriction::CrossDistributedActorSelf: {
1479+
case ActorIsolationRestriction::ActorSelf: {
14811480
if (isPartialApply) {
14821481
// The partially applied InoutArg is a property of actor. This
14831482
// can really only happen when the property is a struct with a
@@ -2076,13 +2075,10 @@ namespace {
20762075
}
20772076
LLVM_FALLTHROUGH; // otherwise, it's invalid so diagnose it.
20782077

2079-
case ActorIsolationRestriction::ActorSelf:
2080-
case ActorIsolationRestriction::CrossDistributedActorSelf: {
2078+
case ActorIsolationRestriction::ActorSelf: {
20812079
auto decl = concDecl.getDecl();
20822080
ctx.Diags.diagnose(component.getLoc(),
20832081
diag::actor_isolated_keypath_component,
2084-
/*isDistributed=*/isolation.getKind() ==
2085-
ActorIsolationRestriction::CrossDistributedActorSelf || // FIXME: remove this
20862082
isolation.getKind() ==
20872083
ActorIsolationRestriction::CrossActorSelf,
20882084
decl->getDescriptiveKind(), decl->getName());
@@ -2175,7 +2171,6 @@ namespace {
21752171

21762172
case ActorIsolationRestriction::CrossActorSelf:
21772173
case ActorIsolationRestriction::ActorSelf:
2178-
case ActorIsolationRestriction::CrossDistributedActorSelf:
21792174
llvm_unreachable("non-member reference into an actor");
21802175

21812176
case ActorIsolationRestriction::GlobalActorUnsafe:
@@ -2213,7 +2208,6 @@ namespace {
22132208
case ActorIsolationRestriction::Unrestricted:
22142209
return false;
22152210

2216-
case ActorIsolationRestriction::CrossDistributedActorSelf:
22172211
case ActorIsolationRestriction::CrossActorSelf: {
22182212
// If a cross-actor reference is to an isolated actor, it's not
22192213
// crossing actors.

lib/Sema/TypeCheckConcurrency.h

+1-6
Original file line numberDiff line numberDiff line change
@@ -115,10 +115,6 @@ class ActorIsolationRestriction {
115115
/// are permitted from elsewhere as a cross-actor reference, but
116116
/// contexts with unspecified isolation won't diagnose anything.
117117
GlobalActorUnsafe,
118-
119-
/// References to declarations that are part of a distributed actor are
120-
/// only permitted if they are async.
121-
CrossDistributedActorSelf, // FIXME(distributed): remove this case entirely rdar://83713366
122118
};
123119

124120
private:
@@ -149,8 +145,7 @@ class ActorIsolationRestriction {
149145
/// Retrieve the actor type that the declaration is within.
150146
NominalTypeDecl *getActorType() const {
151147
assert(kind == ActorSelf ||
152-
kind == CrossActorSelf ||
153-
kind == CrossDistributedActorSelf);
148+
kind == CrossActorSelf);
154149
return data.actorType;
155150
}
156151

lib/Sema/TypeCheckDeclObjC.cpp

-3
Original file line numberDiff line numberDiff line change
@@ -455,9 +455,6 @@ static bool checkObjCActorIsolation(const ValueDecl *VD,
455455
case ActorIsolationRestriction::GlobalActor:
456456
// FIXME: Consider whether to limit @objc on global-actor-qualified
457457
// declarations.
458-
case ActorIsolationRestriction::CrossDistributedActorSelf:
459-
// we do not allow distributed + objc actors.
460-
return false;
461458
case ActorIsolationRestriction::Unrestricted:
462459
case ActorIsolationRestriction::Unsafe:
463460
return false;

lib/Sema/TypeCheckProtocol.cpp

-1
Original file line numberDiff line numberDiff line change
@@ -2878,7 +2878,6 @@ bool ConformanceChecker::checkActorIsolation(
28782878
return true;
28792879
}
28802880

2881-
case ActorIsolationRestriction::CrossDistributedActorSelf:
28822881
case ActorIsolationRestriction::CrossActorSelf:
28832882
return diagnoseNonSendableTypesInReference(
28842883
witness, DC->getParentModule(), witness->getLoc(),

0 commit comments

Comments
 (0)