File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -238,6 +238,25 @@ And the module structure to support such applications looks like this:
238
238
}
239
239
```
240
240
241
+ * [ SE-0429] [ ] :
242
+ Certain types that contain noncopyable fields, such as those without a deinit,
243
+ can now be consumed field-by-field:
244
+
245
+ ``` swift
246
+ struct Token : ~ Copyable {}
247
+
248
+ struct Authentication : ~ Copyable {
249
+ let id: Token
250
+ let name: String
251
+
252
+ mutating func exchange (_ new : consuming Token) -> Token {
253
+ let old = self .id // <- partial consumption of 'self'
254
+ self = .init (id : new, name : self .name )
255
+ return old
256
+ }
257
+ }
258
+ ```
259
+
241
260
* [ SE-0427] [ ] :
242
261
You can now suppress ` Copyable ` on protocols, generic parameters,
243
262
and existentials:
@@ -10517,6 +10536,7 @@ using the `.dynamicType` member to retrieve the type of an expression should mig
10517
10536
[SE- 0411 ]: https: // github.com/apple/swift-evolution/blob/main/proposals/0411-isolated-default-values.md
10518
10537
[SE- 0412 ]: https: // github.com/apple/swift-evolution/blob/main/proposals/0412-strict-concurrency-for-global-variables.md
10519
10538
[SE- 0413 ]: https: // github.com/apple/swift-evolution/blob/main/proposals/0413-typed-throws.md
10539
+ [SE- 0429 ]: https: // github.com/apple/swift-evolution/blob/main/proposals/0429-partial-consumption.md
10520
10540
[SE- 0414 ]: https: // github.com/apple/swift-evolution/blob/main/proposals/0414-region-based-isolation.md
10521
10541
[SE- 0424 ]: https: // github.com/apple/swift-evolution/blob/main/proposals/0424-custom-isolation-checking-for-serialexecutor.md
10522
10542
[SE- 0428 ]: https: // github.com/apple/swift-evolution/blob/main/proposals/0428-resolve-distributed-actor-protocols.md
You can’t perform that action at this time.
0 commit comments