Skip to content

Commit ad290ee

Browse files
committed
Docs: add release note for SE-429
(cherry picked from commit 9a18dcf)
1 parent 9accd0d commit ad290ee

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

CHANGELOG.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,25 @@ And the module structure to support such applications looks like this:
238238
}
239239
```
240240

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+
241260
* [SE-0427][]:
242261
You can now suppress `Copyable` on protocols, generic parameters,
243262
and existentials:
@@ -10517,6 +10536,7 @@ using the `.dynamicType` member to retrieve the type of an expression should mig
1051710536
[SE-0411]: https://github.com/apple/swift-evolution/blob/main/proposals/0411-isolated-default-values.md
1051810537
[SE-0412]: https://github.com/apple/swift-evolution/blob/main/proposals/0412-strict-concurrency-for-global-variables.md
1051910538
[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
1052010540
[SE-0414]: https://github.com/apple/swift-evolution/blob/main/proposals/0414-region-based-isolation.md
1052110541
[SE-0424]: https://github.com/apple/swift-evolution/blob/main/proposals/0424-custom-isolation-checking-for-serialexecutor.md
1052210542
[SE-0428]: https://github.com/apple/swift-evolution/blob/main/proposals/0428-resolve-distributed-actor-protocols.md

0 commit comments

Comments
 (0)