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
64
64
"-enable-builtin-module"
65
65
"-enable-experimental-feature" "RawLayout"
66
66
"-enable-experimental-feature" "StaticExclusiveOnly"
67
- "-enable-experimental-feature" "TransferringArgsAndResults"
68
67
"-enable-experimental-feature" "Extern"
69
68
)
70
69
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ import Builtin
15
15
@available ( SwiftStdlib 6 . 0 , * )
16
16
@frozen
17
17
@usableFromInline
18
- @_rawLayout ( like: Value)
18
+ @_rawLayout ( like: Value, movesAsLike )
19
19
internal struct _Cell < Value: ~ Copyable> : ~ Copyable {
20
20
@available ( SwiftStdlib 6 . 0 , * )
21
21
@_alwaysEmitIntoClient
Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ public struct Mutex<Value: ~Copyable>: ~Copyable {
47
47
@available ( SwiftStdlib 6 . 0 , * )
48
48
@_alwaysEmitIntoClient
49
49
@_transparent
50
- public init ( _ initialValue: transferring consuming Value ) {
50
+ public init ( _ initialValue: consuming sending Value) {
51
51
value = _Cell ( initialValue)
52
52
}
53
53
}
@@ -85,8 +85,8 @@ extension Mutex where Value: ~Copyable {
85
85
@_alwaysEmitIntoClient
86
86
@_transparent
87
87
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 {
90
90
handle. _lock ( )
91
91
92
92
defer {
@@ -132,8 +132,8 @@ extension Mutex where Value: ~Copyable {
132
132
@_alwaysEmitIntoClient
133
133
@_transparent
134
134
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? {
137
137
guard handle. _tryLock ( ) else {
138
138
return nil
139
139
}
You can’t perform that action at this time.
0 commit comments