Skip to content

Commit 87155f9

Browse files
authored
Merge pull request #42308 from slavapestov/primary-associated-types-feature
ASTPrinter: Rename PrimaryAssociatedTypes feature to PrimaryAssociatedTypes2
2 parents c056aeb + 9a7df88 commit 87155f9

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

include/swift/Basic/Features.def

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ LANGUAGE_FEATURE(BuiltinStackAlloc, 0, "Builtin.stackAlloc", true)
7474
SUPPRESSIBLE_LANGUAGE_FEATURE(SpecializeAttributeWithAvailability, 0, "@_specialize attribute with availability", true)
7575
LANGUAGE_FEATURE(BuiltinAssumeAlignment, 0, "Builtin.assumeAlignment", true)
7676
SUPPRESSIBLE_LANGUAGE_FEATURE(UnsafeInheritExecutor, 0, "@_unsafeInheritExecutor", true)
77-
SUPPRESSIBLE_LANGUAGE_FEATURE(PrimaryAssociatedTypes, 346, "Primary associated types", true)
77+
SUPPRESSIBLE_LANGUAGE_FEATURE(PrimaryAssociatedTypes2, 346, "Primary associated types", true)
7878
SUPPRESSIBLE_LANGUAGE_FEATURE(UnavailableFromAsync, 0, "@_unavailableFromAsync", true)
7979
SUPPRESSIBLE_LANGUAGE_FEATURE(NoAsyncAvailability, 340, "@available(*, noasync)", true)
8080

lib/AST/ASTPrinter.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2948,7 +2948,7 @@ static void suppressingFeatureUnsafeInheritExecutor(PrintOptions &options,
29482948
options.ExcludeAttrList.resize(originalExcludeAttrCount);
29492949
}
29502950

2951-
static bool usesFeaturePrimaryAssociatedTypes(Decl *decl) {
2951+
static bool usesFeaturePrimaryAssociatedTypes2(Decl *decl) {
29522952
if (auto *protoDecl = dyn_cast<ProtocolDecl>(decl)) {
29532953
if (protoDecl->getPrimaryAssociatedTypes().size() > 0)
29542954
return true;
@@ -2957,7 +2957,7 @@ static bool usesFeaturePrimaryAssociatedTypes(Decl *decl) {
29572957
return false;
29582958
}
29592959

2960-
static void suppressingFeaturePrimaryAssociatedTypes(PrintOptions &options,
2960+
static void suppressingFeaturePrimaryAssociatedTypes2(PrintOptions &options,
29612961
llvm::function_ref<void()> action) {
29622962
bool originalPrintPrimaryAssociatedTypes = options.PrintPrimaryAssociatedTypes;
29632963
options.PrintPrimaryAssociatedTypes = false;

test/ModuleInterface/parameterized-protocols.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ public protocol HasPrimaryAssociatedTypes<T, U> {
77
associatedtype U : Equatable
88
}
99

10-
// CHECK: #if compiler(>=5.3) && $PrimaryAssociatedTypes
10+
// CHECK: #if compiler(>=5.3) && $PrimaryAssociatedTypes2
1111
// CHECK-NEXT: public protocol HasPrimaryAssociatedTypes<T, U> {
1212
// CHECK-NEXT: associatedtype T : Swift.Collection
1313
// CHECK-NEXT: associatedtype U : Swift.Equatable where Self.U == Self.T.Element

0 commit comments

Comments
 (0)