Skip to content

Commit c5a67fd

Browse files
committed
Remove feature flag for has-async-alt attr
This patch removes the feature flag for @hasAsyncAlternative since it's already protected by the experimental concurrency flag and will go in with the concurrency features. This fixes one of Doug's comments on swiftlang#36027.
1 parent 9756b8b commit c5a67fd

File tree

7 files changed

+3
-27
lines changed

7 files changed

+3
-27
lines changed

include/swift/AST/DiagnosticsParse.def

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1673,10 +1673,6 @@ ERROR(sil_inst_autodiff_invalid_witness_generic_signature,PointsToFirstBadToken,
16731673
(StringRef, StringRef))
16741674

16751675
// hasAsyncAlternative
1676-
ERROR(requires_has_async_alternative, none,
1677-
"'%0' support is required to be explicitly enabled using "
1678-
"-experimental-has-async-alternative-attribute", (StringRef))
1679-
16801676
ERROR(has_async_alternative_invalid_name, none,
16811677
"argument of '%0' attribute must be an identifier or full function name",
16821678
(StringRef))

include/swift/Basic/LangOptions.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -384,9 +384,6 @@ namespace swift {
384384
ASTVerifierOverrideKind ASTVerifierOverride =
385385
ASTVerifierOverrideKind::NoOverride;
386386

387-
/// Allow @hasAsyncAlternative attribute
388-
bool EnableExperimentalHasAsyncAlternative = false;
389-
390387
/// Sets the target we are building for and updates platform conditions
391388
/// to match.
392389
///

include/swift/Option/FrontendOptions.td

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -793,8 +793,4 @@ def new_driver_path
793793
: Separate<["-"], "new-driver-path">, MetaVarName<"<path>">,
794794
HelpText<"Path of the new driver to be used">;
795795

796-
def experimental_has_async_alternative_attribute:
797-
Flag<["-"], "experimental-has-async-alternative-attribute">,
798-
HelpText<"Allow use of @hasAsyncAlternative">;
799-
800796
} // end let Flags = [FrontendOption, NoDriverOption, HelpHidden]

lib/Frontend/CompilerInvocation.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -713,9 +713,6 @@ static bool ParseLangArgs(LangOptions &Opts, ArgList &Args,
713713
}
714714
}
715715

716-
Opts.EnableExperimentalHasAsyncAlternative |=
717-
Args.hasArg(OPT_experimental_has_async_alternative_attribute);
718-
719716
return HadError || UnsupportedOS || UnsupportedArch;
720717
}
721718

lib/Parse/ParseDecl.cpp

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2694,12 +2694,8 @@ bool Parser::parseNewDeclAttribute(DeclAttributes &Attributes, SourceLoc AtLoc,
26942694
return false;
26952695
}
26962696

2697-
if (!DiscardAttribute) {
2698-
if (Context.LangOpts.EnableExperimentalHasAsyncAlternative)
2699-
Attributes.add(attr);
2700-
else
2701-
diagnose(Loc, diag::requires_has_async_alternative, AttrName);
2702-
}
2697+
if (!DiscardAttribute)
2698+
Attributes.add(attr);
27032699
break;
27042700
}
27052701
}

test/attr/attr_hasasyncalternative.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// REQUIRES: concurrency
22

3-
// RUN: %target-typecheck-verify-swift -enable-experimental-concurrency -experimental-has-async-alternative-attribute
3+
// RUN: %target-typecheck-verify-swift -enable-experimental-concurrency
44

55
@hasAsyncAlternative
66
func func1() {}

test/attr/attr_hasasyncalternative_disabled.swift

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

0 commit comments

Comments
 (0)