Skip to content

Commit ab0d198

Browse files
committed
[test] Remove uses of -enable-experimental-async-top-level
This is no longer experimental and is the default.
1 parent 46dfd76 commit ab0d198

10 files changed

+14
-21
lines changed

test/Concurrency/toplevel/async-5-top-level.swift

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
// RUN: %target-swift-frontend -typecheck -target %target-swift-5.1-abi-triple -enable-experimental-async-top-level -swift-version 5 %s -verify
1+
// RUN: %target-swift-frontend -typecheck -target %target-swift-5.1-abi-triple -swift-version 5 %s -verify
22

3-
// enable-experimental-async-top-level is passed and an await is used in the
4-
// top-level, so the top-level code is a concurrent context. Variables are
5-
// declared with `@_predatesConcurrency @MainActor`, and the top-level is run on
6-
// the main actor.
3+
// An await is used in the top-level, so the top-level code is a concurrent
4+
// context. Variables are declared with `@_predatesConcurrency @MainActor`, and
5+
// the top-level is run on the main actor.
76

87
var a = 10 // expected-note {{mutation of this var is only permitted within the actor}}
98

test/Concurrency/toplevel/async-6-top-level.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %target-swift-frontend -typecheck -target %target-swift-5.1-abi-triple -enable-experimental-async-top-level -swift-version 6 %s -verify
1+
// RUN: %target-swift-frontend -typecheck -target %target-swift-5.1-abi-triple -swift-version 6 %s -verify
22

33
var a = 10
44
// expected-note@-1 2 {{var declared here}}

test/Concurrency/toplevel/main.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
// RUN: %empty-directory(%t)
22
// RUN: split-file --leading-lines %s %t
33

4-
// RUN: %target-swift-frontend -typecheck -verify %t/main.swift %t/foo.swift -enable-experimental-async-top-level -swift-version 6 -verify-additional-prefix swift6-
5-
// RUN: %target-swift-frontend -typecheck -verify %t/main.swift %t/foo.swift -enable-experimental-async-top-level -swift-version 5 -verify-additional-prefix swift5-
4+
// RUN: %target-swift-frontend -typecheck -verify %t/main.swift %t/foo.swift -swift-version 6 -verify-additional-prefix swift6-
5+
// RUN: %target-swift-frontend -typecheck -verify %t/main.swift %t/foo.swift -swift-version 5 -verify-additional-prefix swift5-
66

77
//--- foo.swift
88
func foo() -> Int {

test/Concurrency/toplevel/no-async-5-top-level.swift

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
1-
// RUN: %target-swift-frontend -typecheck -target %target-swift-5.1-abi-triple -enable-experimental-async-top-level -swift-version 5 %s -verify
21
// RUN: %target-swift-frontend -typecheck -target %target-swift-5.1-abi-triple -swift-version 5 %s -verify
32

4-
// Even though enable-experimental-async-top-level is enabled, there are no
5-
// `await`s made from the top-level, so it is not an async context. `a` is just
6-
// a normal top-level global variable with no actor isolation.
3+
// There are no `await`s made from the top-level, so it is not an async context.
4+
// `a` is just a normal top-level global variable with no actor isolation.
75

86
var a = 10
97

test/Concurrency/toplevel/no-async-6-top-level.swift

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
// RUN: %target-swift-frontend -typecheck -target %target-swift-5.1-abi-triple -swift-version 6 %s -verify
22

3-
// Even though enable-experimental-async-top-level is enabled, there are no
4-
// 'await's made from the top-level, thus the top-level is not an asynchronous
5-
// context. `a` is just a normal top-level global variable with no actor
6-
// isolation.
3+
// There are no 'await's made from the top-level, thus the top-level is not an
4+
// asynchronous context. `a` is just a normal top-level global variable with no
5+
// actor isolation.
76

87
var a = 10 // expected-note 2 {{var declared here}}
98
// expected-note@-1 2{{mutation of this var is only permitted within the actor}}

test/Concurrency/toplevel/synchronous_mainactor.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %target-swift-frontend -target %target-swift-5.1-abi-triple -enable-experimental-async-top-level -strict-concurrency=complete -typecheck -verify %s
1+
// RUN: %target-swift-frontend -target %target-swift-5.1-abi-triple -strict-concurrency=complete -typecheck -verify %s
22

33
var a = 10 // expected-note{{var declared here}}
44

test/SILGen/top_level_captures.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
// RUN: %target-swift-frontend -emit-silgen %s | %FileCheck %s
2-
// RUN: %target-swift-frontend -enable-experimental-async-top-level -emit-silgen %s | %FileCheck %s
32
// RUN: %target-swift-frontend -experimental-skip-non-inlinable-function-bodies -experimental-skip-non-inlinable-function-bodies-without-types -emit-silgen %s | %FileCheck -check-prefix=SKIPPED-FUNC-EMITTED %s
43

54
guard let x: Int = nil else { while true { } }

test/SILGen/toplevel.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
// RUN: %target-swift-emit-silgen -Xllvm -sil-print-types -Xllvm -sil-full-demangle %s | %FileCheck %s
2-
// RUN: %target-swift-emit-silgen -Xllvm -sil-print-types -Xllvm -sil-full-demangle -enable-experimental-async-top-level %s | %FileCheck %s
32

43
func markUsed<T>(_ t: T) {}
54

test/SILGen/toplevel_errors.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
// RUN: %target-swift-emit-silgen -Xllvm -sil-print-types %s | %FileCheck %s
2-
// RUN: %target-swift-emit-silgen -Xllvm -sil-print-types -enable-experimental-async-top-level %s | %FileCheck %s
32

43
enum MyError : Error {
54
case A, B

test/SILGen/toplevel_globalactorvars.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 -Xllvm -sil-print-types -Xllvm -sil-full-demangle -target %target-swift-5.1-abi-triple -enable-experimental-async-top-level %s | %FileCheck %s
1+
// RUN: %target-swift-emit-silgen -Xllvm -sil-print-types -Xllvm -sil-full-demangle -target %target-swift-5.1-abi-triple %s | %FileCheck %s
22

33
// a
44
// CHECK-LABEL: sil_global hidden @$s24toplevel_globalactorvars1aSivp : $Int

0 commit comments

Comments
 (0)