Skip to content

Commit 2c6bfa2

Browse files
authored
Merge pull request #72967 from jckarter/enable-borrowing-switch-frontend
Enable 'BorrowingSwitch' feature.
2 parents 8d789bd + 10f9289 commit 2c6bfa2

28 files changed

+72
-115
lines changed

include/swift/AST/DiagnosticsParse.def

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -984,7 +984,7 @@ ERROR(extra_var_in_multiple_pattern_list,none,
984984
ERROR(let_pattern_in_immutable_context,none,
985985
"'let' pattern cannot appear nested in an already immutable context", ())
986986
WARNING(borrowing_syntax_change,none,
987-
"'_borrowing' spelling is deprecated; use 'borrowing' without the underscore", ())
987+
"'borrowing' in pattern matches is deprecated; use 'let'", ())
988988
ERROR(borrowing_subpattern_unsupported,none,
989989
"'borrowing' pattern modifier must be directly applied to pattern variable name", ())
990990
ERROR(specifier_must_have_type,none,

include/swift/Basic/Features.def

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,7 @@ UPCOMING_FEATURE(RegionBasedIsolation, 414, 6)
197197
UPCOMING_FEATURE(DynamicActorIsolation, 423, 6)
198198
UPCOMING_FEATURE(NonfrozenEnumExhaustivity, 192, 6)
199199
UPCOMING_FEATURE(GlobalActorIsolatedTypesUsability, 0434, 6)
200+
UPCOMING_FEATURE(BorrowingSwitch, 432, 6)
200201

201202
// Swift 7
202203
UPCOMING_FEATURE(ExistentialAny, 335, 7)
@@ -354,9 +355,6 @@ EXPERIMENTAL_FEATURE(GroupActorErrors, true)
354355
// Allow for the 'transferring' keyword to be applied to arguments and results.
355356
SUPPRESSIBLE_EXPERIMENTAL_FEATURE(TransferringArgsAndResults, true)
356357

357-
// Allow for `switch` of noncopyable values to be borrowing or consuming.
358-
EXPERIMENTAL_FEATURE(BorrowingSwitch, true)
359-
360358
// Enable explicit isolation of closures.
361359
EXPERIMENTAL_FEATURE(ClosureIsolation, true)
362360

lib/ASTGen/Sources/ASTGen/SourceFile.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ extension Parser.ExperimentalFeatures {
6060
mapFeature(.DoExpressions, to: .doExpressions)
6161
mapFeature(.NonescapableTypes, to: .nonescapableTypes)
6262
mapFeature(.TransferringArgsAndResults, to: .transferringArgsAndResults)
63-
mapFeature(.BorrowingSwitch, to: .borrowingSwitch)
6463
}
6564
}
6665

lib/Parse/ParsePattern.cpp

Lines changed: 39 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1323,45 +1323,41 @@ ParserResult<Pattern> Parser::parseMatchingPattern(bool isExprBasic) {
13231323

13241324
// The `borrowing` modifier is a contextual keyword, so it's only accepted
13251325
// directly applied to a binding name, as in `case .foo(borrowing x)`.
1326-
if (Context.LangOpts.hasFeature(Feature::BorrowingSwitch)) {
1327-
if ((Tok.isContextualKeyword("_borrowing")
1328-
|| Tok.isContextualKeyword("borrowing"))
1329-
&& peekToken().isAny(tok::identifier, tok::kw_self, tok::dollarident,
1330-
tok::code_complete)
1331-
&& !peekToken().isAtStartOfLine()) {
1332-
if (Tok.isContextualKeyword("_borrowing")) {
1333-
diagnose(Tok.getLoc(),
1334-
diag::borrowing_syntax_change)
1335-
.fixItReplace(Tok.getLoc(), "borrowing");
1336-
}
1337-
1338-
Tok.setKind(tok::contextual_keyword);
1339-
SourceLoc borrowingLoc = consumeToken();
1340-
1341-
// If we have `case borrowing x.`, `x(`, `x[`, or `x<` then this looks
1342-
// like an attempt to include a subexpression under a `borrowing`
1343-
// binding, which isn't yet supported.
1344-
if (peekToken().isAny(tok::period, tok::period_prefix, tok::l_paren,
1345-
tok::l_square)
1346-
|| (peekToken().isAnyOperator() && peekToken().getText().equals("<"))) {
1347-
1348-
// Diagnose the unsupported production.
1349-
diagnose(Tok.getLoc(),
1350-
diag::borrowing_subpattern_unsupported);
1351-
1352-
// Recover by parsing as if it was supported.
1353-
return parseMatchingPattern(isExprBasic);
1354-
}
1355-
Identifier name;
1356-
SourceLoc nameLoc = consumeIdentifier(name,
1357-
/*diagnoseDollarPrefix*/ false);
1358-
auto namedPattern = createBindingFromPattern(nameLoc, name,
1359-
VarDecl::Introducer::Borrowing);
1360-
auto bindPattern = new (Context) BindingPattern(
1361-
borrowingLoc, VarDecl::Introducer::Borrowing, namedPattern);
1326+
if ((Tok.isContextualKeyword("_borrowing")
1327+
|| Tok.isContextualKeyword("borrowing"))
1328+
&& peekToken().isAny(tok::identifier, tok::kw_self, tok::dollarident,
1329+
tok::code_complete)
1330+
&& !peekToken().isAtStartOfLine()) {
1331+
diagnose(Tok.getLoc(),
1332+
diag::borrowing_syntax_change)
1333+
.fixItReplace(Tok.getLoc(), "let");
1334+
1335+
Tok.setKind(tok::contextual_keyword);
1336+
SourceLoc borrowingLoc = consumeToken();
1337+
1338+
// If we have `case borrowing x.`, `x(`, `x[`, or `x<` then this looks
1339+
// like an attempt to include a subexpression under a `borrowing`
1340+
// binding, which isn't yet supported.
1341+
if (peekToken().isAny(tok::period, tok::period_prefix, tok::l_paren,
1342+
tok::l_square)
1343+
|| (peekToken().isAnyOperator() && peekToken().getText().equals("<"))) {
1344+
1345+
// Diagnose the unsupported production.
1346+
diagnose(Tok.getLoc(),
1347+
diag::borrowing_subpattern_unsupported);
13621348

1363-
return makeParserResult(bindPattern);
1349+
// Recover by parsing as if it was supported.
1350+
return parseMatchingPattern(isExprBasic);
13641351
}
1352+
Identifier name;
1353+
SourceLoc nameLoc = consumeIdentifier(name,
1354+
/*diagnoseDollarPrefix*/ false);
1355+
auto namedPattern = createBindingFromPattern(nameLoc, name,
1356+
VarDecl::Introducer::Borrowing);
1357+
auto bindPattern = new (Context) BindingPattern(
1358+
borrowingLoc, VarDecl::Introducer::Borrowing, namedPattern);
1359+
1360+
return makeParserResult(bindPattern);
13651361
}
13661362

13671363
// matching-pattern ::= 'is' type
@@ -1442,14 +1438,12 @@ Parser::parseMatchingPatternAsBinding(PatternBindingState newState,
14421438
}
14431439

14441440
bool Parser::isOnlyStartOfMatchingPattern() {
1445-
if (Context.LangOpts.hasFeature(Feature::BorrowingSwitch)) {
1446-
if ((Tok.isContextualKeyword("_borrowing")
1447-
|| Tok.isContextualKeyword("borrowing"))
1448-
&& peekToken().isAny(tok::identifier, tok::kw_self, tok::dollarident,
1449-
tok::code_complete)
1450-
&& !peekToken().isAtStartOfLine()) {
1451-
return true;
1452-
}
1441+
if ((Tok.isContextualKeyword("_borrowing")
1442+
|| Tok.isContextualKeyword("borrowing"))
1443+
&& peekToken().isAny(tok::identifier, tok::kw_self, tok::dollarident,
1444+
tok::code_complete)
1445+
&& !peekToken().isAtStartOfLine()) {
1446+
return true;
14531447
}
14541448

14551449
return Tok.isAny(tok::kw_var, tok::kw_let, tok::kw_is) ||

lib/Sema/MiscDiagnostics.cpp

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4575,18 +4575,6 @@ diagnoseMoveOnlyPatternMatchSubject(ASTContext &C,
45754575
|| !subjectType->isNoncopyable()) {
45764576
return;
45774577
}
4578-
4579-
// A bare reference to, or load from, a move-only binding must be consumed.
4580-
subjectExpr = subjectExpr->getSemanticsProvidingExpr();
4581-
if (auto load = dyn_cast<LoadExpr>(subjectExpr)) {
4582-
subjectExpr = load->getSubExpr()->getSemanticsProvidingExpr();
4583-
}
4584-
if (!C.LangOpts.hasFeature(Feature::BorrowingSwitch)
4585-
&& isa<DeclRefExpr>(subjectExpr)) {
4586-
C.Diags.diagnose(subjectExpr->getLoc(),
4587-
diag::move_only_pattern_match_not_consumed)
4588-
.fixItInsert(subjectExpr->getStartLoc(), "consume ");
4589-
}
45904578
}
45914579

45924580
// Perform MiscDiagnostics on Switch Statements.

stdlib/public/core/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ list(APPEND swift_stdlib_compile_flags "-Xfrontend" "-enable-experimental-concis
315315
list(APPEND swift_stdlib_compile_flags "-enable-experimental-feature" "Macros")
316316
list(APPEND swift_stdlib_compile_flags "-enable-experimental-feature" "FreestandingMacros")
317317
list(APPEND swift_stdlib_compile_flags "-enable-experimental-feature" "Extern")
318-
list(APPEND swift_stdlib_compile_flags "-enable-experimental-feature" "BorrowingSwitch")
318+
list(APPEND swift_stdlib_compile_flags "-enable-experimental-feature" "BitwiseCopyable")
319319

320320
if("${SWIFT_NATIVE_SWIFT_TOOLS_PATH}" STREQUAL "")
321321
set(swift_bin_dir "${CMAKE_BINARY_DIR}/bin")

test/Interpreter/moveonly_linkedlist_2_simple.swift

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
// RUN: %target-swift-emit-irgen \
22
// RUN: -parse-as-library \
33
// RUN: -enable-builtin-module \
4-
// RUN: -enable-experimental-feature BorrowingSwitch \
54
// RUN: %s \
65
// RUN: | \
76
// RUN: %FileCheck %s --check-prefix=CHECK-IR
8-
// RUN: %target-run-simple-swift(-parse-as-library -enable-builtin-module -enable-experimental-feature BorrowingSwitch -Xfrontend -sil-verify-all) | %FileCheck %s
9-
// RUN: %target-run-simple-swift(-O -parse-as-library -enable-builtin-module -enable-experimental-feature BorrowingSwitch -Xfrontend -sil-verify-all) | %FileCheck %s
10-
// RUN: %target-run-simple-swift(-O -parse-as-library -enable-builtin-module -enable-experimental-feature BorrowingSwitch -Xfrontend -sil-verify-all -Xfrontend -enable-ossa-modules) | %FileCheck %s
7+
// RUN: %target-run-simple-swift(-parse-as-library -enable-builtin-module -Xfrontend -sil-verify-all) | %FileCheck %s
8+
// RUN: %target-run-simple-swift(-O -parse-as-library -enable-builtin-module -Xfrontend -sil-verify-all) | %FileCheck %s
9+
// RUN: %target-run-simple-swift(-O -parse-as-library -enable-builtin-module -Xfrontend -sil-verify-all -Xfrontend -enable-ossa-modules) | %FileCheck %s
1110

1211
// REQUIRES: executable_test
1312

test/Interpreter/moveonly_swiftskell.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@
66
// RUN: -module-name Swiftskell \
77
// RUN: -parse-as-library \
88
// RUN: %S/../Inputs/Swiftskell.swift -c -o %t/Swiftskell.o \
9-
// RUN: -enable-experimental-feature NonescapableTypes \
10-
// RUN: -enable-experimental-feature BorrowingSwitch
9+
// RUN: -enable-experimental-feature NonescapableTypes
1110

1211
// RUN: %target-build-swift -o %t/a.out %s -I %t %t/Swiftskell.o
1312
// RUN: %target-codesign %t/a.out

test/ModuleInterface/noncopyable_generics.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
// RUN: %target-swift-frontend -swift-version 5 -enable-library-evolution -emit-module \
1111
// RUN: -enable-experimental-feature SuppressedAssociatedTypes \
1212
// RUN: -enable-experimental-feature NonescapableTypes \
13-
// RUN: -enable-experimental-feature BorrowingSwitch \
1413
// RUN: -o %t/Swiftskell.swiftmodule \
1514
// RUN: -emit-module-interface-path %t/Swiftskell.swiftinterface \
1615
// RUN: %S/../Inputs/Swiftskell.swift

test/Parse/pattern_borrow_bindings.swift

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %target-swift-frontend -enable-experimental-feature BorrowingSwitch -typecheck -verify %s
1+
// RUN: %target-swift-frontend -typecheck -verify %s
22

33
struct Payload: ~Copyable {
44
var x: Int
@@ -38,16 +38,19 @@ func testBorrowingPatterns(bar: borrowing Bar) {
3838
case borrowing (): // parses as `borrowing()` as before
3939
break
4040

41-
case borrowing x:
41+
case borrowing x: // expected-warning{{'borrowing' in pattern matches is deprecated}} {{10-19=let}}
4242
useBorrowBar(x)
4343

44-
case .payload(borrowing x):
44+
case .payload(borrowing x): // expected-warning{{'borrowing' in pattern matches is deprecated}} {{19-28=let}}
4545
useBorrowFoo(x)
4646

47-
case borrowing x.member: // expected-error{{'borrowing' pattern modifier must be directly applied to pattern variable name}} expected-error{{cannot find 'x' in scope}}
47+
case borrowing x.member: // expected-warning{{deprecated}} expected-error{{'borrowing' pattern modifier must be directly applied to pattern variable name}} expected-error{{cannot find 'x' in scope}}
4848
break
4949

50-
case _borrowing x: // expected-warning{{'_borrowing' spelling is deprecated}} {{10-20=borrowing}}
50+
case borrowing x: // expected-warning{{'borrowing' in pattern matches is deprecated}} {{10-19=let}}
51+
useBorrowBar(x)
52+
53+
case _borrowing x: // expected-warning{{'borrowing' in pattern matches is deprecated}} {{10-20=let}}
5154
useBorrowBar(x)
5255

5356
default:

test/SILGen/borrowing_switch_return_binding_compat.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %target-swift-emit-silgen -enable-experimental-feature BorrowingSwitch -verify %s
1+
// RUN: %target-swift-emit-silgen -verify %s
22
func orElse<T: ~Copyable>(
33
x: consuming T?,
44
defaultValue: @autoclosure () throws -> T?

test/SILGen/borrowing_switch_return_on_all_paths.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %target-swift-emit-silgen -enable-experimental-feature BorrowingSwitch -verify %s
1+
// RUN: %target-swift-emit-silgen -verify %s
22

33
struct Box<Wrapped: ~Copyable>: ~Copyable {
44
var wrapped: Wrapped {

test/SILGen/borrowing_switch_subjects.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %target-swift-emit-silgen -enable-experimental-feature BorrowingSwitch %s | %FileCheck %s
1+
// RUN: %target-swift-emit-silgen %s | %FileCheck %s
22

33
struct Inner: ~Copyable {}
44

test/SILGen/moveonly_consuming_switch.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// RUN: %target-swift-frontend \
22
// RUN: -emit-silgen \
33
// RUN: %s \
4-
// RUN: -enable-experimental-feature BorrowingSwitch \
54
// RUN: | %FileCheck %s
65

76
enum MaybeMaybeVoid<Wrapped: ~Copyable>: ~Copyable {

test/SILOptimizer/lifetime_dependence_optional.swift

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22
// RUN: -verify \
33
// RUN: -sil-verify-all \
44
// RUN: -module-name test \
5-
// RUN: -enable-experimental-feature NonescapableTypes \
6-
// RUN: -enable-experimental-feature BorrowingSwitch
5+
// RUN: -enable-experimental-feature NonescapableTypes
76

87
// REQUIRES: asserts
98
// REQUIRES: swift_in_compiler
@@ -58,7 +57,7 @@ extension Nillable where Wrapped: ~Copyable {
5857
_ transform: (borrowing Wrapped) throws(E) -> U
5958
) throws(E) -> U? {
6059
switch self {
61-
case .some(borrowing y):
60+
case .some(let y):
6261
return .some(try transform(y))
6362
case .none:
6463
return .none
@@ -82,7 +81,7 @@ extension Nillable where Wrapped: ~Copyable {
8281
_ transform: (borrowing Wrapped) throws(E) -> U?
8382
) throws(E) -> U? {
8483
switch self {
85-
case .some(borrowing y):
84+
case .some(let y):
8685
return try transform(y)
8786
case .none:
8887
return .none

test/SILOptimizer/moveonly_addresschecker_diagnostics.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %target-swift-emit-sil %s -O -sil-verify-all -verify -enable-experimental-feature BorrowingSwitch -enable-experimental-feature MoveOnlyPartialReinitialization -enable-experimental-feature NoImplicitCopy -enable-experimental-feature MoveOnlyClasses
1+
// RUN: %target-swift-emit-sil %s -O -sil-verify-all -verify -enable-experimental-feature MoveOnlyPartialReinitialization -enable-experimental-feature NoImplicitCopy -enable-experimental-feature MoveOnlyClasses
22

33
//////////////////
44
// Declarations //

test/SILOptimizer/moveonly_borrowing_switch.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-sil -verify -enable-experimental-feature BorrowingSwitch %s
1+
// RUN: %target-swift-frontend -emit-sil -verify %s
22

33
struct Payload: ~Copyable {
44
var x: Int

test/SILOptimizer/moveonly_borrowing_switch_copyable_subpattern.swift

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %target-swift-frontend -emit-sil -verify -enable-experimental-feature BorrowingSwitch %s
1+
// RUN: %target-swift-frontend -emit-sil -verify %s
22

33
struct Payload: ~Copyable {
44
var x: Int
@@ -31,25 +31,7 @@ func test(borrowing foo: borrowing Foo) {
3131
eat(x)
3232
nibble(x)
3333

34-
// `borrowing` match variables impose the no-implicit-copy constraint
35-
// like `borrowing` parameters do.
36-
case .copyablePayload(borrowing x) // expected-error{{'x' is borrowed and cannot be consumed}}
37-
where hungryCondition(x): // expected-note{{consumed here}}
38-
eat(x) // expected-note{{consumed here}}
39-
nibble(x)
40-
41-
case .copyablePayload(borrowing x) // expected-error{{'x' is borrowed and cannot be consumed}}
42-
where condition(x):
43-
eat(x) // expected-note{{consumed here}}
44-
nibble(x)
45-
46-
// Explicit copies are OK.
47-
case .copyablePayload(borrowing x)
48-
where hungryCondition(copy x):
49-
eat(copy x)
50-
nibble(x)
51-
52-
case .copyablePayload(borrowing x):
34+
case .copyablePayload(let x):
5335
nibble(x)
5436
}
5537
}

test/SILOptimizer/moveonly_borrowing_switch_load_borrow.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %target-swift-frontend -enable-experimental-feature BorrowingSwitch -emit-sil -verify %s
1+
// RUN: %target-swift-frontend -emit-sil -verify %s
22

33
struct Box<Wrapped: ~Copyable>: ~Copyable {
44
init(_ element: consuming Wrapped) { }

test/SILOptimizer/moveonly_borrowing_switch_mode_with_partial_consume.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-sil -verify -enable-experimental-feature BorrowingSwitch -parse-as-library %s
1+
// RUN: %target-swift-frontend -emit-sil -verify -parse-as-library %s
22

33
func foo() {
44
let node = Node()

test/SILOptimizer/moveonly_borrowing_switch_yield.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %target-swift-frontend -enable-experimental-feature BorrowingSwitch -parse-as-library -O -emit-sil -verify %s
1+
// RUN: %target-swift-frontend -parse-as-library -O -emit-sil -verify %s
22

33
extension List {
44
var peek: Element {

test/SILOptimizer/moveonly_consuming_switch.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-sil -enable-experimental-feature BorrowingSwitch -verify %s
1+
// RUN: %target-swift-frontend -emit-sil -verify %s
22

33
// TODO: Remove this and just use the real `UnsafeMutablePointer` when
44
// noncopyable type support has been upstreamed.

test/SILOptimizer/moveonly_consuming_switch_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-sil -enable-experimental-feature BorrowingSwitch -verify %s
1+
// RUN: %target-swift-frontend -emit-sil -verify %s
22

33
struct Box: ~Copyable {
44
let ptr: UnsafeMutablePointer<Int>

test/SILOptimizer/moveonly_objectchecker_diagnostics.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %target-swift-emit-sil -enable-experimental-feature BorrowingSwitch -sil-verify-all -verify -enable-experimental-feature MoveOnlyClasses %s
1+
// RUN: %target-swift-emit-sil -sil-verify-all -verify -enable-experimental-feature MoveOnlyClasses %s
22

33
//////////////////
44
// Declarations //

test/SILOptimizer/moveonly_trivial_addresschecker_diagnostics.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %target-swift-emit-sil -enable-experimental-feature BorrowingSwitch -enable-experimental-feature MoveOnlyPartialReinitialization -sil-verify-all -verify %s
1+
// RUN: %target-swift-emit-sil -enable-experimental-feature MoveOnlyPartialReinitialization -sil-verify-all -verify %s
22

33
//////////////////
44
// Declarations //

test/SILOptimizer/moveonly_trivial_objectchecker_diagnostics.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %target-swift-emit-sil -enable-experimental-feature BorrowingSwitch -sil-verify-all -verify %s
1+
// RUN: %target-swift-emit-sil -sil-verify-all -verify %s
22

33
//////////////////
44
// Declarations //

validation-test/IRGen/moveonly_partial_consumption_linked_list.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// RUN: %target-swift-emit-ir \
22
// RUN: %s \
33
// RUN: -enable-builtin-module \
4-
// RUN: -enable-experimental-feature BorrowingSwitch \
54
// RUN: -sil-verify-all \
65
// RUN: -verify
76

validation-test/SILOptimizer/moveonly_partial_consumption_linked_list.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// RUN: %target-swift-emit-sil \
22
// RUN: %s \
33
// RUN: -enable-builtin-module \
4-
// RUN: -enable-experimental-feature BorrowingSwitch \
54
// RUN: -sil-verify-all \
65
// RUN: -verify
76

0 commit comments

Comments
 (0)