1111//===----------------------------------------------------------------------===//
1212
1313@available ( SwiftStdlib 6 . 3 , * )
14- public protocol BorrowIteratorProtocol < Element> : ~ Copyable, ~ Escapable {
14+ public protocol BorrowingIteratorProtocol < Element> : ~ Copyable, ~ Escapable {
1515 associatedtype Element: ~ Copyable
1616
1717 // FIXME: This ought to be a core requirement, but `Ref` is not a thing yet.
@@ -90,7 +90,7 @@ public protocol BorrowIteratorProtocol<Element>: ~Copyable, ~Escapable {
9090}
9191
9292@available ( SwiftStdlib 6 . 3 , * )
93- extension BorrowIteratorProtocol where Self: ~ Copyable & ~ Escapable {
93+ extension BorrowingIteratorProtocol where Self: ~ Copyable & ~ Escapable {
9494 @_alwaysEmitIntoClient
9595 @_lifetime ( & self )
9696 @_lifetime ( self : copy self )
@@ -101,7 +101,7 @@ extension BorrowIteratorProtocol where Self: ~Copyable & ~Escapable {
101101}
102102
103103@available ( SwiftStdlib 6 . 3 , * )
104- extension BorrowIteratorProtocol where Self: ~ Copyable & ~ Escapable {
104+ extension BorrowingIteratorProtocol where Self: ~ Copyable & ~ Escapable {
105105 @_alwaysEmitIntoClient
106106 @_lifetime ( self: copy self)
107107 public mutating func skip( by offset: Int ) -> Int {
@@ -115,29 +115,29 @@ extension BorrowIteratorProtocol where Self: ~Copyable & ~Escapable {
115115 }
116116}
117117
118- @available ( SwiftStdlib 6 . 3 , * )
119- extension Span : Iterable where Element: ~ Copyable {
120- // FIXME: This simple definition cannot also be a backward (or bidirectional)
121- // iterator, nor a random-access iterator. If we want to go in that direction,
122- // we'll need to rather introduce a type more like `RigidArray.BorrowIterator`.
123- public typealias BorrowIterator = Self
124-
125- @_alwaysEmitIntoClient
126- @_transparent
127- public var estimatedCount : EstimatedCount {
128- . exactly( count)
129- }
130-
131- @_alwaysEmitIntoClient
132- @_lifetime ( copy self)
133- @_transparent
134- public func startBorrowIteration( ) -> Span < Element > {
135- self
136- }
137- }
118+ // @available(SwiftStdlib 6.3, *)
119+ // extension Span: Iterable where Element: ~Copyable {
120+ // // FIXME: This simple definition cannot also be a backward (or bidirectional)
121+ // // iterator, nor a random-access iterator. If we want to go in that direction,
122+ // // we'll need to rather introduce a type more like `RigidArray.BorrowIterator`.
123+ // public typealias BorrowIterator = Self
124+ //
125+ // @_alwaysEmitIntoClient
126+ // @_transparent
127+ // public var estimatedCount: EstimatedCount {
128+ // .exactly(count)
129+ // }
130+ //
131+ // @_alwaysEmitIntoClient
132+ // @_lifetime(copy self)
133+ // @_transparent
134+ // public func startBorrowIteration() -> Span<Element> {
135+ // self
136+ // }
137+ // }
138138
139139@available ( SwiftStdlib 6 . 3 , * )
140- extension Span : BorrowIteratorProtocol where Element: ~ Copyable {
140+ extension Span : BorrowingIteratorProtocol where Element: ~ Copyable {
141141 @_alwaysEmitIntoClient
142142 @_lifetime ( & self )
143143 @_lifetime ( self: copy self)
@@ -148,38 +148,38 @@ extension Span: BorrowIteratorProtocol where Element: ~Copyable {
148148 }
149149}
150150
151- @available ( SwiftStdlib 6 . 3 , * )
152- extension MutableSpan : Iterable where Element: ~ Copyable {
153- public typealias BorrowIterator = Span < Element > . BorrowIterator
154-
155- @_alwaysEmitIntoClient
156- @_transparent
157- public var estimatedCount : EstimatedCount {
158- . exactly( count)
159- }
160-
161- @_alwaysEmitIntoClient
162- @_lifetime ( borrow self)
163- @_transparent
164- public func startBorrowIteration( ) -> Span < Element > {
165- span
166- }
167- }
168-
169- @available ( SwiftStdlib 6 . 3 , * )
170- extension OutputSpan : Iterable where Element: ~ Copyable {
171- public typealias BorrowIterator = Span < Element > . BorrowIterator
172-
173- @_alwaysEmitIntoClient
174- @_transparent
175- public var estimatedCount : EstimatedCount {
176- . exactly( count)
177- }
178-
179- @_alwaysEmitIntoClient
180- @_lifetime ( borrow self)
181- @_transparent
182- public func startBorrowIteration( ) -> Span < Element > {
183- self . span
184- }
185- }
151+ // @available(SwiftStdlib 6.3, *)
152+ // extension MutableSpan: Iterable where Element: ~Copyable {
153+ // public typealias BorrowIterator = Span<Element>.BorrowIterator
154+ //
155+ // @_alwaysEmitIntoClient
156+ // @_transparent
157+ // public var estimatedCount: EstimatedCount {
158+ // .exactly(count)
159+ // }
160+ //
161+ // @_alwaysEmitIntoClient
162+ // @_lifetime(borrow self)
163+ // @_transparent
164+ // public func startBorrowIteration() -> Span<Element> {
165+ // span
166+ // }
167+ // }
168+ //
169+ // @available(SwiftStdlib 6.3, *)
170+ // extension OutputSpan: Iterable where Element: ~Copyable {
171+ // public typealias BorrowIterator = Span<Element>.BorrowIterator
172+ //
173+ // @_alwaysEmitIntoClient
174+ // @_transparent
175+ // public var estimatedCount: EstimatedCount {
176+ // .exactly(count)
177+ // }
178+ //
179+ // @_alwaysEmitIntoClient
180+ // @_lifetime(borrow self)
181+ // @_transparent
182+ // public func startBorrowIteration() -> Span<Element> {
183+ // self.span
184+ // }
185+ // }
0 commit comments