Skip to content

Commit c4b65be

Browse files
authored
Merge pull request #79048 from hborla/delete-infer-public-sendable-flag
[Concurrency] Remove `EnableInferPublicSendable`.
2 parents 0ba17c5 + 430d25f commit c4b65be

File tree

5 files changed

+2
-36
lines changed

5 files changed

+2
-36
lines changed

include/swift/Basic/LangOptions.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -411,9 +411,6 @@ namespace swift {
411411
/// implementation quirk of previous compilers.
412412
bool DisableNamedLazyImportAsMemberLoading = false;
413413

414-
/// Enable inference of Sendable conformances for public types.
415-
bool EnableInferPublicSendable = false;
416-
417414
/// Disable the implicit import of the _Concurrency module.
418415
bool DisableImplicitConcurrencyModuleImport =
419416
!SWIFT_IMPLICIT_CONCURRENCY_IMPORT;

include/swift/Option/FrontendOptions.td

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -287,9 +287,6 @@ def copy_propagation_state_EQ :
287287
HelpText<"Whether to enable copy propagation">,
288288
MetaVarName<"true|requested-passes-only|false">;
289289

290-
def enable_infer_public_concurrent_value : Flag<["-"], "enable-infer-public-sendable">,
291-
HelpText<"Enable inference of Sendable conformances for public structs and enums">;
292-
293290
def disable_infer_public_concurrent_value : Flag<["-"], "disable-infer-public-sendable">,
294291
HelpText<"Disable inference of Sendable conformances for public structs and enums">;
295292

lib/Frontend/CompilerInvocation.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -924,11 +924,6 @@ static bool ParseLangArgs(LangOptions &Opts, ArgList &Args,
924924
Opts.EnableExperimentalConcurrency |=
925925
Args.hasArg(OPT_enable_experimental_concurrency);
926926

927-
Opts.EnableInferPublicSendable |=
928-
Args.hasFlag(OPT_enable_infer_public_concurrent_value,
929-
OPT_disable_infer_public_concurrent_value,
930-
false);
931-
932927
Opts.DisableExperimentalClangImporterDiagnostics |=
933928
Args.hasArg(OPT_disable_experimental_clang_importer_diagnostics);
934929

lib/Sema/TypeCheckConcurrency.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6815,10 +6815,8 @@ ProtocolConformance *swift::deriveImplicitSendableConformance(
68156815

68166816
SendableCheck check;
68176817

6818-
// Okay to infer Sendable conformance for non-public types or when
6819-
// specifically requested.
6820-
if (nominal->getASTContext().LangOpts.EnableInferPublicSendable ||
6821-
!nominal->getFormalAccessScope(
6818+
// Okay to infer Sendable conformance for non-public types.
6819+
if (!nominal->getFormalAccessScope(
68226820
/*useDC=*/nullptr, /*treatUsableFromInlineAsPublic=*/true)
68236821
.isPublic()) {
68246822
check = SendableCheck::Implicit;

test/Concurrency/concurrent_value_inference_public.swift

Lines changed: 0 additions & 21 deletions
This file was deleted.

0 commit comments

Comments
 (0)