@@ -2446,6 +2446,7 @@ bool swift::diagnoseExplicitUnavailability(SourceLoc loc,
24462446 auto proto = rootConf->getProtocol ()->getDeclaredInterfaceType ();
24472447
24482448 StringRef platform;
2449+ auto behavior = DiagnosticBehavior::Unspecified;
24492450 switch (attr->getPlatformAgnosticAvailability ()) {
24502451 case PlatformAgnosticAvailabilityKind::Deprecated:
24512452 llvm_unreachable (" shouldn't see deprecations in explicit unavailability" );
@@ -2456,6 +2457,12 @@ bool swift::diagnoseExplicitUnavailability(SourceLoc loc,
24562457 // This was platform-specific; indicate the platform.
24572458 platform = attr->prettyPlatformString ();
24582459 break ;
2460+ } else if (rootConf->getProtocol ()->isSpecificProtocol (
2461+ KnownProtocolKind::Sendable) &&
2462+ !ctx.LangOpts .isSwiftVersionAtLeast (6 )) {
2463+ // Downgrade unavailable Sendable conformances to warnings prior to
2464+ // Swift 6.
2465+ behavior = DiagnosticBehavior::Warning;
24592466 }
24602467 LLVM_FALLTHROUGH;
24612468
@@ -2474,7 +2481,8 @@ bool swift::diagnoseExplicitUnavailability(SourceLoc loc,
24742481 EncodedDiagnosticMessage EncodedMessage (attr->Message );
24752482 diags.diagnose (loc, diag::conformance_availability_unavailable,
24762483 type, proto,
2477- platform.empty (), platform, EncodedMessage.Message );
2484+ platform.empty (), platform, EncodedMessage.Message )
2485+ .limitBehavior (behavior);
24782486
24792487 switch (attr->getVersionAvailability (ctx)) {
24802488 case AvailableVersionComparison::Available:
0 commit comments