Skip to content

Commit 943cc3c

Browse files
committed
[NoncopyablePartialConsumption] Enable.
SE-429 was accepted. rdar://126275392
1 parent d898001 commit 943cc3c

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
@@ -191,6 +191,7 @@ UPCOMING_FEATURE(GlobalConcurrency, 412, 6)
191191
UPCOMING_FEATURE(InferSendableFromCaptures, 418, 6)
192192
UPCOMING_FEATURE(ImplicitOpenExistentials, 352, 6)
193193
UPCOMING_FEATURE(RegionBasedIsolation, 414, 6)
194+
UPCOMING_FEATURE(MoveOnlyPartialConsumption, 429, 6)
194195

195196
// Swift 7
196197
UPCOMING_FEATURE(ExistentialAny, 335, 7)
@@ -217,7 +218,6 @@ EXPERIMENTAL_FEATURE(NoImplicitCopy, true)
217218
EXPERIMENTAL_FEATURE(OldOwnershipOperatorSpellings, true)
218219
EXPERIMENTAL_FEATURE(MoveOnlyEnumDeinits, true)
219220
EXPERIMENTAL_FEATURE(MoveOnlyTuples, true)
220-
EXPERIMENTAL_FEATURE(MoveOnlyPartialConsumption, true)
221221
EXPERIMENTAL_FEATURE(MoveOnlyPartialReinitialization, true)
222222

223223
EXPERIMENTAL_FEATURE(OneWayClosureParameters, false)

lib/AST/FeatureSet.cpp

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

450450
UNINTERESTING_FEATURE(MoveOnlyTuples)
451451

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

457455
UNINTERESTING_FEATURE(MoveOnlyPartialReinitialization)
458456

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)