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 {
316
316
// iterator, not the original word.
317
317
extension _UnsafeBitset . Word : Sequence , IteratorProtocol {
318
318
319
- #if $NoncopyableGenerics
320
319
@usableFromInline
321
320
typealias Element = Int
322
- #endif
323
321
324
322
@inlinable
325
323
internal var count : Int {
Original file line number Diff line number Diff line change @@ -1286,10 +1286,7 @@ internal struct _ClosureBasedSequence<Iterator: IteratorProtocol> {
1286
1286
extension _ClosureBasedSequence : Sendable { }
1287
1287
1288
1288
extension _ClosureBasedSequence : Sequence {
1289
-
1290
- #if $NoncopyableGenerics
1291
1289
public typealias Element = Iterator . Element
1292
- #endif
1293
1290
1294
1291
@inlinable
1295
1292
internal func makeIterator( ) -> Iterator {
Original file line number Diff line number Diff line change @@ -231,7 +231,7 @@ func _rethrowsViaClosure(_ fn: () throws -> ()) rethrows {
231
231
@_marker public protocol Escapable { }
232
232
233
233
#if $BitwiseCopyable2
234
- #if $NoncopyableGenerics && $ NonescapableTypes
234
+ #if $NonescapableTypes
235
235
@_marker public protocol BitwiseCopyable : ~ Escapable { }
236
236
#else
237
237
@_marker public protocol BitwiseCopyable { }
@@ -240,7 +240,7 @@ func _rethrowsViaClosure(_ fn: () throws -> ()) rethrows {
240
240
@available ( * , deprecated, message: " Use BitwiseCopyable " )
241
241
public typealias _BitwiseCopyable = BitwiseCopyable
242
242
#else
243
- #if $NoncopyableGenerics && $ NonescapableTypes
243
+ #if $NonescapableTypes
244
244
@_marker public protocol _BitwiseCopyable : ~ Escapable { }
245
245
#else
246
246
@_marker public protocol _BitwiseCopyable { }
Original file line number Diff line number Diff line change @@ -230,16 +230,12 @@ extension Optional where Wrapped: ~Copyable {
230
230
public borrowing func _borrowingMap< U: ~ Copyable, E: Error > (
231
231
_ transform: ( borrowing Wrapped ) throws ( E ) -> U
232
232
) throws ( E) -> U ? {
233
- #if compiler(>=6.0) && $NoncopyableGenerics
234
233
switch self {
235
234
case . some( let y) :
236
235
return . some( try transform ( y) )
237
236
case . none:
238
237
return . none
239
238
}
240
- #else
241
- fatalError ( " unsupported compiler " )
242
- #endif
243
239
}
244
240
}
245
241
@@ -308,16 +304,12 @@ extension Optional where Wrapped: ~Copyable {
308
304
public func _borrowingFlatMap< U: ~ Copyable, E: Error > (
309
305
_ transform: ( borrowing Wrapped ) throws ( E ) -> U ?
310
306
) throws ( E) -> U ? {
311
- #if compiler(>=6.0) && $NoncopyableGenerics
312
307
switch self {
313
308
case . some( let y) :
314
309
return try transform ( y)
315
310
case . none:
316
311
return . none
317
312
}
318
- #else
319
- fatalError ( " Unsupported compiler " )
320
- #endif
321
313
}
322
314
}
323
315
Original file line number Diff line number Diff line change 132
132
/// ### Sendable Metatypes
133
133
///
134
134
/// Metatypes such as `Int.Type` implicitly conform to the `Sendable` protocol.
135
- #if $NoncopyableGenerics && $ NonescapableTypes
135
+ #if $NonescapableTypes
136
136
@_marker public protocol Sendable : ~ Copyable, ~ Escapable { }
137
- #elseif $NoncopyableGenerics
138
- @_marker public protocol Sendable : ~ Copyable { }
139
137
#else
140
- @_marker public protocol Sendable { }
138
+ @_marker public protocol Sendable : ~ Copyable { }
141
139
#endif
140
+
142
141
///
143
142
/// A type whose values can safely be passed across concurrency domains by copying,
144
143
/// 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> {
1272
1272
1273
1273
extension IteratorSequence : IteratorProtocol , Sequence {
1274
1274
1275
- #if $NoncopyableGenerics
1276
- public typealias Element = Base . Element
1277
- #endif
1275
+ public typealias Element = Base . Element
1278
1276
1279
1277
/// Advances to the next element and returns it, or `nil` if no next element
1280
1278
/// exists.
You can’t perform that action at this time.
0 commit comments