File tree Expand file tree Collapse file tree 3 files changed +6
-7
lines changed
stdlib/public/Synchronization Expand file tree Collapse file tree 3 files changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -64,7 +64,6 @@ set(SWIFT_SYNCHRNOIZATION_SWIFT_FLAGS
6464 "-enable-builtin-module"
6565 "-enable-experimental-feature" "RawLayout"
6666 "-enable-experimental-feature" "StaticExclusiveOnly"
67- "-enable-experimental-feature" "TransferringArgsAndResults"
6867 "-enable-experimental-feature" "Extern"
6968)
7069
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ import Builtin
1515@available ( SwiftStdlib 6 . 0 , * )
1616@frozen
1717@usableFromInline
18- @_rawLayout ( like: Value)
18+ @_rawLayout ( like: Value, movesAsLike )
1919internal struct _Cell < Value: ~ Copyable> : ~ Copyable {
2020 @available ( SwiftStdlib 6 . 0 , * )
2121 @_alwaysEmitIntoClient
Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ public struct Mutex<Value: ~Copyable>: ~Copyable {
4747 @available ( SwiftStdlib 6 . 0 , * )
4848 @_alwaysEmitIntoClient
4949 @_transparent
50- public init ( _ initialValue: transferring consuming Value ) {
50+ public init ( _ initialValue: consuming sending Value) {
5151 value = _Cell ( initialValue)
5252 }
5353}
@@ -85,8 +85,8 @@ extension Mutex where Value: ~Copyable {
8585 @_alwaysEmitIntoClient
8686 @_transparent
8787 public borrowing func withLock< Result: ~ Copyable, E: Error > (
88- _ body: @Sendable ( inout Value ) throws ( E ) -> transferring Result
89- ) throws ( E) -> transferring Result {
88+ _ body: @Sendable ( inout Value ) throws ( E ) -> sending Result
89+ ) throws ( E) -> sending Result {
9090 handle. _lock ( )
9191
9292 defer {
@@ -132,8 +132,8 @@ extension Mutex where Value: ~Copyable {
132132 @_alwaysEmitIntoClient
133133 @_transparent
134134 public borrowing func withLockIfAvailable< Result: ~ Copyable, E: Error > (
135- _ body: @Sendable ( inout Value ) throws ( E ) -> transferring Result
136- ) throws ( E) -> transferring Result? {
135+ _ body: @Sendable ( inout Value ) throws ( E ) -> sending Result
136+ ) throws ( E) -> sending Result? {
137137 guard handle. _tryLock ( ) else {
138138 return nil
139139 }
You can’t perform that action at this time.
0 commit comments