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 55
66## Swift 6.0
77
8+ * [ SE-0429] [ ] :
9+ Certain types that contain noncopyable fields, such as those without a deinit,
10+ can now be consumed field-by-field:
11+
12+ ``` swift
13+ struct Token : ~ Copyable {}
14+
15+ struct Authentication : ~ Copyable {
16+ let id: Token
17+ let name: String
18+
19+ mutating func exchange (_ new : consuming Token) -> Token {
20+ let old = self .id // <- partial consumption of 'self'
21+ self = .init (id : new, name : self .name )
22+ return old
23+ }
24+ }
25+ ```
26+
827* [ SE-0427] [ ] :
928 You can now suppress ` Copyable ` on protocols, generic parameters,
1029 and existentials:
@@ -10287,6 +10306,7 @@ using the `.dynamicType` member to retrieve the type of an expression should mig
1028710306[SE- 0413 ]: https: // github.com/apple/swift-evolution/blob/main/proposals/0413-typed-throws.md
1028810307[SE- 0422 ]: https: // github.com/apple/swift-evolution/blob/main/proposals/0422-caller-side-default-argument-macro-expression.md
1028910308[SE- 0427 ]: https: // github.com/apple/swift-evolution/blob/main/proposals/0427-noncopyable-generics.md
10309+ [SE- 0429 ]: https: // github.com/apple/swift-evolution/blob/main/proposals/0429-partial-consumption.md
1029010310[#64927 ]: < https: // github.com/apple/swift/issues/64927>
1029110311[#42697 ]: < https: // github.com/apple/swift/issues/42697>
1029210312[#42728 ]: < https: // github.com/apple/swift/issues/42728>
You can’t perform that action at this time.
0 commit comments