Skip to content

Commit 430d25f

Browse files
committed
[Concurrency] Remove EnableInferPublicSendable.
1 parent 6a3011d commit 430d25f

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
@@ -291,9 +291,6 @@ def copy_propagation_state_EQ :
291291
HelpText<"Whether to enable copy propagation">,
292292
MetaVarName<"true|requested-passes-only|false">;
293293

294-
def enable_infer_public_concurrent_value : Flag<["-"], "enable-infer-public-sendable">,
295-
HelpText<"Enable inference of Sendable conformances for public structs and enums">;
296-
297294
def disable_infer_public_concurrent_value : Flag<["-"], "disable-infer-public-sendable">,
298295
HelpText<"Disable inference of Sendable conformances for public structs and enums">;
299296

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
@@ -6846,10 +6846,8 @@ ProtocolConformance *swift::deriveImplicitSendableConformance(
68466846

68476847
SendableCheck check;
68486848

6849-
// Okay to infer Sendable conformance for non-public types or when
6850-
// specifically requested.
6851-
if (nominal->getASTContext().LangOpts.EnableInferPublicSendable ||
6852-
!nominal->getFormalAccessScope(
6849+
// Okay to infer Sendable conformance for non-public types.
6850+
if (!nominal->getFormalAccessScope(
68536851
/*useDC=*/nullptr, /*treatUsableFromInlineAsPublic=*/true)
68546852
.isPublic()) {
68556853
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)