File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed
stdlib/public/Concurrency Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -144,6 +144,7 @@ public protocol SerialExecutor: Executor {
144
144
145
145
/// Convert this executor value to the optimized form of borrowed
146
146
/// executor references.
147
+ @unsafe
147
148
func asUnownedSerialExecutor( ) -> UnownedSerialExecutor
148
149
149
150
/// If this executor has complex equality semantics, and the runtime needs to
Original file line number Diff line number Diff line change @@ -37,3 +37,10 @@ func f() async { // expected-warning{{global function 'f' involves unsafe code;
37
37
38
38
// expected-warning@+1{{type alias 'WeirdC' involves unsafe code; use '@unsafe' to indicate that its use is not memory-safe}}
39
39
typealias WeirdC = RequiresSendable < C > // expected-note{{@unchecked conformance of 'C' to protocol 'Sendable' involves unsafe code}}
40
+
41
+
42
+ @available ( SwiftStdlib 5 . 9 , * )
43
+ final class MyExecutor : SerialExecutor {
44
+ func enqueue( _ job: consuming ExecutorJob ) { fatalError ( " boom " ) }
45
+ @unsafe func asUnownedSerialExecutor( ) -> UnownedSerialExecutor { fatalError ( " boom " ) }
46
+ }
You can’t perform that action at this time.
0 commit comments