Align Iterable with proposal

Adds throwing and ~Escapable elements
This commit is contained in:
Nate Cook authored and Karoy Lorentey committed 2026-06-17 14:27:29 -07:00
1 parent 4bda43f4a9
commit dca015d7e8
37 files changed
+234 -221

No files matched your search

@@ -96,12 +96,12 @@ extension UniqueArray /*where Element: Copyable*/ {
/// The sequence must not contain more than `capacity` elements.
@_alwaysEmitIntoClient
@inline(__always)
public init<Source: Iterable_<Element> & ~Copyable & ~Escapable>(
public init<Source: Iterable_<Element, E> & ~Copyable & ~Escapable, E>(
capacity: Int? = nil,
copying contents: borrowing Source
) {
) throws(E) {
self.init(minimumCapacity: capacity ?? 0)
self.append(copying: contents)
try self.append(copying: contents)
}
#endif
@@ -132,7 +132,7 @@ extension UniqueArray /*where Element: Copyable*/ {
/// - contents: The container whose contents to copy into the new array.
@_alwaysEmitIntoClient
@inline(__always)
public init<Source: Iterable_<Element> & Sequence<Element>>(
public init<Source: Iterable_<Element, Never> & Sequence<Element>>(
capacity: Int? = nil,
copying contents: Source
) {