@@ -200,8 +200,9 @@ extension Optional {
200
200
}
201
201
202
202
extension Optional where Wrapped: ~ Copyable {
203
+ // FIXME(NCG): Make this public.
203
204
@_alwaysEmitIntoClient
204
- public consuming func consumingMap < U : ~ Copyable, E : Error> (
205
+ public consuming func _consumingMap < U: ~ Copyable, E: Error > (
205
206
_ transform: ( consuming Wrapped ) throws ( E ) -> U
206
207
) throws ( E) -> U ? {
207
208
switch consume self {
@@ -213,8 +214,9 @@ extension Optional where Wrapped: ~Copyable {
213
214
}
214
215
215
216
#if hasFeature(BorrowingSwitch)
217
+ // FIXME(NCG): Make this public.
216
218
@_alwaysEmitIntoClient
217
- public borrowing func borrowingMap < U: ~ Copyable, E: Error > (
219
+ public borrowing func _borrowingMap < U: ~ Copyable, E: Error > (
218
220
_ transform: ( borrowing Wrapped ) throws ( E ) -> U
219
221
) throws ( E) -> U ? {
220
222
switch self {
@@ -262,8 +264,9 @@ extension Optional {
262
264
}
263
265
264
266
extension Optional where Wrapped: ~ Copyable {
267
+ // FIXME(NCG): Make this public.
265
268
@_alwaysEmitIntoClient
266
- public consuming func consumingFlatMap < U : ~ Copyable, E : Error> (
269
+ public consuming func _consumingFlatMap < U: ~ Copyable, E: Error > (
267
270
_ transform: ( consuming Wrapped ) throws ( E ) -> U ?
268
271
) throws ( E) -> U ? {
269
272
switch consume self {
@@ -275,8 +278,9 @@ extension Optional where Wrapped: ~Copyable {
275
278
}
276
279
277
280
#if hasFeature(BorrowingSwitch)
281
+ // FIXME(NCG): Make this public.
278
282
@_alwaysEmitIntoClient
279
- public func borrowingFlatMap < U: ~ Copyable, E: Error > (
283
+ public func _borrowingFlatMap < U: ~ Copyable, E: Error > (
280
284
_ transform: ( borrowing Wrapped ) throws ( E ) -> U ?
281
285
) throws ( E) -> U ? {
282
286
switch self {
@@ -326,9 +330,9 @@ extension Optional {
326
330
}
327
331
328
332
extension Optional where Wrapped: ~ Copyable {
329
- // FIXME(NCG): Do we want this? It seems like we do.
333
+ // FIXME(NCG): Do we want this? It seems like we do. Make this public.
330
334
@_alwaysEmitIntoClient
331
- public consuming func consumingUnsafelyUnwrap ( ) -> Wrapped {
335
+ public consuming func _consumingUnsafelyUnwrap ( ) -> Wrapped {
332
336
switch consume self {
333
337
case . some( let x) :
334
338
return x
@@ -386,8 +390,8 @@ extension Optional where Wrapped: ~Copyable {
386
390
///
387
391
/// - Returns: The wrapped value being stored in this instance. If this
388
392
/// instance is `nil`, returns `nil`.
389
- @_alwaysEmitIntoClient // FIXME(NCG): This is new in Swift 6
390
- public mutating func take ( ) -> Self {
393
+ @_alwaysEmitIntoClient // FIXME(NCG): Make this public.
394
+ public mutating func _take ( ) -> Self {
391
395
let result = consume self
392
396
self = nil
393
397
return result
0 commit comments