File tree Expand file tree Collapse file tree 6 files changed +6
-22
lines changed Expand file tree Collapse file tree 6 files changed +6
-22
lines changed Original file line number Diff line number Diff line change @@ -316,10 +316,8 @@ extension _UnsafeBitset.Word {
316316// iterator, not the original word.
317317extension _UnsafeBitset . Word : Sequence , IteratorProtocol {
318318
319- #if $NoncopyableGenerics
320319 @usableFromInline
321320 typealias Element = Int
322- #endif
323321
324322 @inlinable
325323 internal var count : Int {
Original file line number Diff line number Diff line change @@ -1286,10 +1286,7 @@ internal struct _ClosureBasedSequence<Iterator: IteratorProtocol> {
12861286extension _ClosureBasedSequence : Sendable { }
12871287
12881288extension _ClosureBasedSequence : Sequence {
1289-
1290- #if $NoncopyableGenerics
12911289 public typealias Element = Iterator . Element
1292- #endif
12931290
12941291 @inlinable
12951292 internal func makeIterator( ) -> Iterator {
Original file line number Diff line number Diff line change @@ -231,7 +231,7 @@ func _rethrowsViaClosure(_ fn: () throws -> ()) rethrows {
231231@_marker public protocol Escapable { }
232232
233233#if $BitwiseCopyable2
234- #if $NoncopyableGenerics && $ NonescapableTypes
234+ #if $NonescapableTypes
235235@_marker public protocol BitwiseCopyable : ~ Escapable { }
236236#else
237237@_marker public protocol BitwiseCopyable { }
@@ -240,7 +240,7 @@ func _rethrowsViaClosure(_ fn: () throws -> ()) rethrows {
240240@available ( * , deprecated, message: " Use BitwiseCopyable " )
241241public typealias _BitwiseCopyable = BitwiseCopyable
242242#else
243- #if $NoncopyableGenerics && $ NonescapableTypes
243+ #if $NonescapableTypes
244244@_marker public protocol _BitwiseCopyable : ~ Escapable { }
245245#else
246246@_marker public protocol _BitwiseCopyable { }
Original file line number Diff line number Diff line change @@ -230,16 +230,12 @@ extension Optional where Wrapped: ~Copyable {
230230 public borrowing func _borrowingMap< U: ~ Copyable, E: Error > (
231231 _ transform: ( borrowing Wrapped ) throws ( E ) -> U
232232 ) throws ( E) -> U ? {
233- #if compiler(>=6.0) && $NoncopyableGenerics
234233 switch self {
235234 case . some( let y) :
236235 return . some( try transform ( y) )
237236 case . none:
238237 return . none
239238 }
240- #else
241- fatalError ( " unsupported compiler " )
242- #endif
243239 }
244240}
245241
@@ -308,16 +304,12 @@ extension Optional where Wrapped: ~Copyable {
308304 public func _borrowingFlatMap< U: ~ Copyable, E: Error > (
309305 _ transform: ( borrowing Wrapped ) throws ( E ) -> U ?
310306 ) throws ( E) -> U ? {
311- #if compiler(>=6.0) && $NoncopyableGenerics
312307 switch self {
313308 case . some( let y) :
314309 return try transform ( y)
315310 case . none:
316311 return . none
317312 }
318- #else
319- fatalError ( " Unsupported compiler " )
320- #endif
321313 }
322314}
323315
Original file line number Diff line number Diff line change 132132/// ### Sendable Metatypes
133133///
134134/// Metatypes such as `Int.Type` implicitly conform to the `Sendable` protocol.
135- #if $NoncopyableGenerics && $ NonescapableTypes
135+ #if $NonescapableTypes
136136@_marker public protocol Sendable : ~ Copyable, ~ Escapable { }
137- #elseif $NoncopyableGenerics
138- @_marker public protocol Sendable : ~ Copyable { }
139137#else
140- @_marker public protocol Sendable { }
138+ @_marker public protocol Sendable : ~ Copyable { }
141139#endif
140+
142141///
143142/// A type whose values can safely be passed across concurrency domains by copying,
144143/// but which disables some safety checking at the conformance site.
Original file line number Diff line number Diff line change @@ -1272,9 +1272,7 @@ public struct IteratorSequence<Base: IteratorProtocol> {
12721272
12731273extension IteratorSequence : IteratorProtocol , Sequence {
12741274
1275- #if $NoncopyableGenerics
1276- public typealias Element = Base . Element
1277- #endif
1275+ public typealias Element = Base . Element
12781276
12791277 /// Advances to the next element and returns it, or `nil` if no next element
12801278 /// exists.
You can’t perform that action at this time.
0 commit comments