Skip to content

Commit 33c76b6

Browse files
Merge pull request #73843 from nate-chandler/rdar128611158
[Features] Move NoncopyableGenerics up.
2 parents 0f332e1 + 60cdbb8 commit 33c76b6

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

include/swift/Basic/Features.def

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,9 +192,9 @@ SUPPRESSIBLE_LANGUAGE_FEATURE(AssociatedTypeImplements, 0, "@_implements on asso
192192
LANGUAGE_FEATURE(BuiltinAddressOfRawLayout, 0, "Builtin.addressOfRawLayout")
193193
LANGUAGE_FEATURE(MoveOnlyPartialConsumption, 429, "Partial consumption of noncopyable values")
194194
LANGUAGE_FEATURE(BitwiseCopyable, 426, "BitwiseCopyable protocol")
195+
SUPPRESSIBLE_LANGUAGE_FEATURE(NoncopyableGenerics, 427, "Noncopyable generics")
195196
SUPPRESSIBLE_LANGUAGE_FEATURE(ConformanceSuppression, 426, "Suppressible inferred conformances")
196197
SUPPRESSIBLE_LANGUAGE_FEATURE(BitwiseCopyable2, 426, "BitwiseCopyable feature")
197-
SUPPRESSIBLE_LANGUAGE_FEATURE(NoncopyableGenerics, 427, "Noncopyable generics")
198198
LANGUAGE_FEATURE(BodyMacros, 415, "Function body macros")
199199

200200
// Swift 6
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
// RUN: %empty-directory(%t)
2+
// RUN: %target-swift-emit-module-interface(%t.swiftinterface) %s -module-name Mojuel
3+
// RUN: %FileCheck %s < %t.swiftinterface
4+
// RUN: %target-swift-typecheck-module-from-interface(%t.swiftinterface -module-name Mojuel)
5+
6+
// CHECK: #if compiler(>=5.3) && $ConformanceSuppression
7+
// CHECK-NEXT: public enum RecollectionOrganization<T> : ~Swift.BitwiseCopyable, Swift.Copyable where T : ~Copyable {
8+
// CHECK-NEXT: }
9+
// CHECK-NEXT: #elseif compiler(>=5.3) && $NoncopyableGenerics
10+
// CHECK-NEXT: public enum RecollectionOrganization<T> : Swift.Copyable where T : ~Copyable {
11+
// CHECK-NEXT: }
12+
// CHECK-NEXT: #else
13+
// CHECK-NEXT: public enum RecollectionOrganization<T> {
14+
// CHECK-NEXT: }
15+
// CHECK-NEXT: #endif
16+
public enum RecollectionOrganization<T : ~Copyable> : ~BitwiseCopyable, Copyable {}

0 commit comments

Comments
 (0)