Skip to content

Commit 71eb166

Browse files
committed
[NoncopyablePartialConsumption] Enable.
SE-429 was accepted. rdar://126275392
1 parent bdb71e0 commit 71eb166

File tree

35 files changed

+58
-60
lines changed

35 files changed

+58
-60
lines changed

include/swift/Basic/Features.def

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,7 @@ UPCOMING_FEATURE(GlobalConcurrency, 412, 6)
190190
UPCOMING_FEATURE(InferSendableFromCaptures, 418, 6)
191191
UPCOMING_FEATURE(ImplicitOpenExistentials, 352, 6)
192192
UPCOMING_FEATURE(RegionBasedIsolation, 414, 6)
193+
UPCOMING_FEATURE(MoveOnlyPartialConsumption, 429, 6)
193194

194195
// Swift 7
195196
UPCOMING_FEATURE(ExistentialAny, 335, 7)
@@ -216,7 +217,6 @@ EXPERIMENTAL_FEATURE(NoImplicitCopy, true)
216217
EXPERIMENTAL_FEATURE(OldOwnershipOperatorSpellings, true)
217218
EXPERIMENTAL_FEATURE(MoveOnlyEnumDeinits, true)
218219
EXPERIMENTAL_FEATURE(MoveOnlyTuples, true)
219-
EXPERIMENTAL_FEATURE(MoveOnlyPartialConsumption, true)
220220
EXPERIMENTAL_FEATURE(MoveOnlyPartialReinitialization, true)
221221

222222
EXPERIMENTAL_FEATURE(OneWayClosureParameters, false)

lib/AST/FeatureSet.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -448,10 +448,8 @@ static bool usesFeatureMoveOnlyEnumDeinits(Decl *decl) {
448448

449449
UNINTERESTING_FEATURE(MoveOnlyTuples)
450450

451-
static bool usesFeatureMoveOnlyPartialConsumption(Decl *decl) {
452-
// Partial consumption does not affect declarations directly.
453-
return false;
454-
}
451+
// Partial consumption does not affect declarations directly.
452+
UNINTERESTING_FEATURE(MoveOnlyPartialConsumption)
455453

456454
UNINTERESTING_FEATURE(MoveOnlyPartialReinitialization)
457455

test/Interpreter/move_expr_moveonly_partial_consumption.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// RUN: %target-run-simple-swift(-parse-as-library -Xfrontend -sil-verify-all -enable-experimental-feature MoveOnlyPartialConsumption) | %FileCheck %s
2-
// RUN: %target-run-simple-swift(-parse-as-library -O -Xfrontend -sil-verify-all -enable-experimental-feature MoveOnlyPartialConsumption) | %FileCheck %s
1+
// RUN: %target-run-simple-swift(-parse-as-library -Xfrontend -sil-verify-all -enable-upcoming-feature MoveOnlyPartialConsumption) | %FileCheck %s
2+
// RUN: %target-run-simple-swift(-parse-as-library -O -Xfrontend -sil-verify-all -enable-upcoming-feature MoveOnlyPartialConsumption) | %FileCheck %s
33

44
// REQUIRES: executable_test
55

test/Interpreter/move_expr_moveonly_partial_consumption_addr.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// RUN: %target-run-simple-swift(-parse-as-library -Xfrontend -sil-verify-all -enable-experimental-feature MoveOnlyPartialConsumption) | %FileCheck %s
2-
// RUN: %target-run-simple-swift(-parse-as-library -O -Xfrontend -sil-verify-all -enable-experimental-feature MoveOnlyPartialConsumption) | %FileCheck %s
1+
// RUN: %target-run-simple-swift(-parse-as-library -Xfrontend -sil-verify-all -enable-upcoming-feature MoveOnlyPartialConsumption) | %FileCheck %s
2+
// RUN: %target-run-simple-swift(-parse-as-library -O -Xfrontend -sil-verify-all -enable-upcoming-feature MoveOnlyPartialConsumption) | %FileCheck %s
33

44
// REQUIRES: executable_test
55

test/Interpreter/moveonly_address_maximize.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
// RUN: %target-run-simple-swift(-Xfrontend -sil-verify-all -enable-experimental-feature MoveOnlyPartialConsumption) | %FileCheck %s
2-
// RUN: %target-run-simple-swift(-O -Xfrontend -sil-verify-all -enable-experimental-feature MoveOnlyPartialConsumption) | %FileCheck %s
1+
// RUN: %target-run-simple-swift(-Xfrontend -sil-verify-all -enable-upcoming-feature MoveOnlyPartialConsumption) | %FileCheck %s
2+
// RUN: %target-run-simple-swift(-O -Xfrontend -sil-verify-all -enable-upcoming-feature MoveOnlyPartialConsumption) | %FileCheck %s
33

4-
// RUN: %target-run-simple-swift(-enable-experimental-feature NoncopyableGenerics -Xfrontend -sil-verify-all -enable-experimental-feature MoveOnlyPartialConsumption) | %FileCheck %s
5-
// RUN: %target-run-simple-swift(-enable-experimental-feature NoncopyableGenerics -O -Xfrontend -sil-verify-all -enable-experimental-feature MoveOnlyPartialConsumption) | %FileCheck %s
4+
// RUN: %target-run-simple-swift(-enable-experimental-feature NoncopyableGenerics -Xfrontend -sil-verify-all -enable-upcoming-feature MoveOnlyPartialConsumption) | %FileCheck %s
5+
// RUN: %target-run-simple-swift(-enable-experimental-feature NoncopyableGenerics -O -Xfrontend -sil-verify-all -enable-upcoming-feature MoveOnlyPartialConsumption) | %FileCheck %s
66

77
// REQUIRES: executable_test
88

test/Interpreter/moveonly_partial_consume_value.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// RUN: %target-run-simple-swift(-Xfrontend -sil-verify-all -enable-experimental-feature MoveOnlyPartialConsumption) | %FileCheck %s
2-
// RUN: %target-run-simple-swift(-O -Xfrontend -sil-verify-all -enable-experimental-feature MoveOnlyPartialConsumption) | %FileCheck %s
1+
// RUN: %target-run-simple-swift(-Xfrontend -sil-verify-all -enable-upcoming-feature MoveOnlyPartialConsumption) | %FileCheck %s
2+
// RUN: %target-run-simple-swift(-O -Xfrontend -sil-verify-all -enable-upcoming-feature MoveOnlyPartialConsumption) | %FileCheck %s
33

44
// REQUIRES: executable_test
55

test/SILGen/moveonly_consuming_switch.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// RUN: -emit-silgen \
33
// RUN: %s \
44
// RUN: -enable-experimental-feature BorrowingSwitch \
5-
// RUN: -enable-experimental-feature MoveOnlyPartialConsumption \
5+
// RUN: -enable-upcoming-feature MoveOnlyPartialConsumption \
66
// RUN: -enable-experimental-feature NoncopyableGenerics \
77
// RUN: | %FileCheck %s
88

test/SILGen/moveonly_library_evolution.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// RUN: %target-swift-emit-silgen -enable-experimental-feature MoveOnlyPartialConsumption -enable-experimental-feature NoImplicitCopy -enable-library-evolution %s | %FileCheck %s
2-
// RUN: %target-swift-emit-sil -O -sil-verify-all -enable-experimental-feature MoveOnlyPartialConsumption -enable-experimental-feature NoImplicitCopy -enable-library-evolution %s
1+
// RUN: %target-swift-emit-silgen -enable-upcoming-feature MoveOnlyPartialConsumption -enable-experimental-feature NoImplicitCopy -enable-library-evolution %s | %FileCheck %s
2+
// RUN: %target-swift-emit-sil -O -sil-verify-all -enable-upcoming-feature MoveOnlyPartialConsumption -enable-experimental-feature NoImplicitCopy -enable-library-evolution %s
33

44
////////////////////////
55
// MARK: Declarations //

test/SILGen/moveonly_optional_operations_2.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %target-swift-frontend -emit-silgen -enable-experimental-feature NoncopyableGenerics -enable-experimental-feature MoveOnlyPartialConsumption -parse-stdlib -module-name Swift %s | %FileCheck %s
1+
// RUN: %target-swift-frontend -emit-silgen -enable-experimental-feature NoncopyableGenerics -enable-upcoming-feature MoveOnlyPartialConsumption -parse-stdlib -module-name Swift %s | %FileCheck %s
22

33
@_marker protocol Copyable {}
44
@_marker protocol Escapable {}

test/SILOptimizer/moveonly_addresschecker.sil

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %target-sil-opt -module-name moveonly_addresschecker -sil-move-only-address-checker -enable-experimental-feature MoveOnlyClasses -enable-experimental-feature MoveOnlyPartialConsumption -enable-sil-verify-all %s | %FileCheck %s
1+
// RUN: %target-sil-opt -module-name moveonly_addresschecker -sil-move-only-address-checker -enable-experimental-feature MoveOnlyClasses -enable-upcoming-feature MoveOnlyPartialConsumption -enable-sil-verify-all %s | %FileCheck %s
22

33
sil_stage raw
44

0 commit comments

Comments
 (0)