Skip to content

Commit 5bc7ea1

Browse files
committed
Features: Sendable doesn't use NoncopyableGenerics
(cherry picked from commit 2d065bb)
1 parent 43af914 commit 5bc7ea1

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

lib/AST/FeatureSet.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -551,6 +551,13 @@ static bool usesFeatureNoncopyableGenerics(Decl *decl) {
551551
SmallVector<InverseRequirement, 2> inverseReqs;
552552

553553
if (auto *proto = dyn_cast<ProtocolDecl>(decl)) {
554+
555+
// We have baked-in support for Sendable not needing to state inverses
556+
// in its inheritance clause within interface files. So, it technically is
557+
// not using the feature with respect to the concerns of an interface file.
558+
if (proto->isSpecificProtocol(KnownProtocolKind::Sendable))
559+
return false;
560+
554561
proto->getRequirementSignature().getRequirementsWithInverses(
555562
proto, reqs, inverseReqs);
556563
} else if (auto *genCtx = decl->getAsGenericContext()) {

0 commit comments

Comments
 (0)